Skip to content

Conversation

@mx-psi
Copy link
Member

@mx-psi mx-psi commented Sep 18, 2025

Description

Adds GetOrInsertDefault method to configoptional.Optional. Uses it in tests.

We originally did not do this because we only had use cases for this in tests. However #13856 shows that this is useful in programmatic use cases as well.

Link to tracking issue

Fixes #13856

@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.37%. Comparing base (cb24802) to head (a9b14ca).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
config/configoptional/optional.go 75.00% 2 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (75.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13859   +/-   ##
=======================================
  Coverage   91.36%   91.37%           
=======================================
  Files         648      648           
  Lines       42626    42636   +10     
=======================================
+ Hits        38947    38960   +13     
+ Misses       2855     2852    -3     
  Partials      824      824           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@bogdandrutu bogdandrutu added this pull request to the merge queue Sep 18, 2025
Merged via the queue into open-telemetry:main with commit d1a5e5a Sep 18, 2025
57 of 58 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 18, 2025
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[configoptional] programmatic usage is uneasy

5 participants