Skip to content

Conversation

@jmacd
Copy link
Contributor

@jmacd jmacd commented Aug 6, 2025

Description

The QueueBatch is not validating Batch configuration.
I may have expected the configoptional package to handle the validate reflection and do this automatically (?) but it doesn't.

Addresses missing error, see regression fixed in open-telemetry/opentelemetry-collector-contrib#41830.

Link to tracking issue

Part of #13579

Testing

Added

Documentation

n/a

@jmacd jmacd requested review from a team, bogdandrutu and dmitryax as code owners August 6, 2025 22:15
Comment on lines +83 to +85
if err := cfg.Batch.Get().Validate(); err != nil {
return err
}
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

The reason is that we use that in Service and ask everyone to not manually call Validate for embedded fields. So I think this should work for this case as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the issue #13579
I am a bit confused why you suggest xconfmap.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, now I see that xconfmap is where this code lives (thought it was confmap).
#13579 (comment)

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.08%. Comparing base (cb546d8) to head (2c2eb8c).
⚠️ Report is 63 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13580      +/-   ##
==========================================
- Coverage   92.15%   92.08%   -0.07%     
==========================================
  Files         605      605              
  Lines       31827    31831       +4     
==========================================
- Hits        29329    29313      -16     
- Misses       1973     1988      +15     
- Partials      525      530       +5     

☔ 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 jmacd marked this pull request as draft August 11, 2025 17:32
@jmacd
Copy link
Contributor Author

jmacd commented Aug 19, 2025

This was rolled into #13611.

@jmacd jmacd closed this Aug 19, 2025
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.

2 participants