Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[TEST] fix test failure with elasticsearch exporter on cxx20 #3308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

dbarker
Copy link
Contributor

@dbarker dbarker commented Mar 21, 2025

Fixes #3278

Changes

Removes the conditional that switches to std::format on cxx20 in es_log_recordable.cc.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@dbarker dbarker requested a review from a team as a code owner March 21, 2025 16:52
Copy link

netlify bot commented Mar 21, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit bc67a28
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/67e110fa2f268200080607ab

@dbarker
Copy link
Contributor Author

dbarker commented Mar 21, 2025

Steps to reproduce the elasticsearch exporter test failure in a linux container.

  1. build and run a dev container setting CXX_STANDARD=20.
cd <path-to-opentelemetry-cpp>
docker build --build-arg CXX_STANDARD=20 --build-arg USER_UID="$(id -u)" --build-arg USER_GID="$(id -g)"  -t opentelemetry-cpp-dev:cxx20 -f ./.devcontainer/Dockerfile.dev .
docker run -it -v "$PWD:/workspaces/opentelemetry-cpp" opentelemetry-cpp-dev:cxx20 bash
  1. build the elasticsearch exporter and run tests
cmake -S . -B ~/build -DWITH_ELASTICSEARCH=ON
cmake --build ~/build 
ctest --test-dir ~/build

@dbarker dbarker changed the title fix test failure with elasticsearch exporter on cxx20 [TEST] fix test failure with elasticsearch exporter on cxx20 Mar 21, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.52%. Comparing base (2c9b68f) to head (bc67a28).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3308      +/-   ##
==========================================
+ Coverage   89.50%   89.52%   +0.02%     
==========================================
  Files         210      210              
  Lines        6522     6522              
==========================================
+ Hits         5837     5838       +1     
+ Misses        685      684       -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@marcalff marcalff added the ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve) label Mar 24, 2025
@marcalff marcalff merged commit 2566fb6 into open-telemetry:main Mar 24, 2025
58 checks passed
@dbarker dbarker deleted the fix_elasticsearch_test_on_cxx20 branch March 31, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ElasticsearchLogRecordableTests.BasicTests fails on Ubuntu 24.04 with CXX_STANDARD=20
3 participants