Skip to content

Conversation

@mx-psi
Copy link
Member

@mx-psi mx-psi commented Nov 25, 2025

Description

Updates configoptional.Optional.Unmarshal to set the inner value to the zero value when the resulting value is a configoptional.None.

@mx-psi mx-psi requested a review from a team as a code owner November 25, 2025 17:30
@mx-psi mx-psi requested a review from dmathieu November 25, 2025 17:30
@mx-psi mx-psi force-pushed the mx-psi/scrub-zero-value-contents branch from a9a8102 to a9131d0 Compare November 25, 2025 17:31
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (9e38bee) to head (a9131d0).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14218      +/-   ##
==========================================
- Coverage   92.14%   92.13%   -0.01%     
==========================================
  Files         666      666              
  Lines       41441    41443       +2     
==========================================
- Hits        38186    38185       -1     
- Misses       2216     2218       +2     
- Partials     1039     1040       +1     

☔ 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.

@jmacd
Copy link
Contributor

jmacd commented Nov 25, 2025

As discussed in #14155 and the corresponding contrib PR, there are a few tests where this will help. The specific circumstances we identified were:

  • component sets QueueBatchConfig to enabled by default using configoptional.Some()
  • component tests that enabled: false disables the feature
  • component tests equality with an expected Optional[T]

Without this fix, we can't construct the correct Optional[T] expectation, because the Unmarshal yields flavor=none with a non-zero value. With this fix, we will test with configoptional.NoneT after enabled: false.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 25, 2025

CodSpeed Performance Report

Merging #14218 will not alter performance

Comparing mx-psi:mx-psi/scrub-zero-value-contents (a9131d0) with main (9e38bee)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 118 untouched

@mx-psi mx-psi added this pull request to the merge queue Nov 26, 2025
Merged via the queue into open-telemetry:main with commit 0ad18e5 Nov 26, 2025
62 checks passed
@mx-psi mx-psi deleted the mx-psi/scrub-zero-value-contents branch November 26, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants