Fix Handle null context in Baggage.fromContext() and Baggage.fromContextOrNull() - #8667
Fix Handle null context in Baggage.fromContext() and Baggage.fromContextOrNull()#8667NithinU2802 wants to merge 2 commits into
Conversation
Pull request dashboard statusWaiting on maintainers · refreshed 2026-08-07 02:17 UTC Merge when ready. Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8667 +/- ##
============================================
- Coverage 91.46% 91.46% -0.01%
- Complexity 10456 10458 +2
============================================
Files 1021 1021
Lines 27647 27653 +6
Branches 3242 3242
============================================
+ Hits 25288 25293 +5
Misses 1616 1616
- Partials 743 744 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…l and fromContextOrNull_null tests, and add LogCapturer assertions
|
Hi @jack-berg, could you please review this PR once you get a chance. |
|
Hi @NithinU2802 — just a friendly reminder that this pull request is waiting on you. There are still items that need your attention. See the dashboard status comment for the full list. You don't need to push a code change to hand it back — replying to move each discussion forward is enough, whether that's answering a question, explaining why no change is needed, or asking a follow-up. The dashboard then automatically routes it back to reviewers. If you believe this pull request is incorrectly routed as waiting on the author, comment |
In Baggage, to add null checks to Baggage.fromContext(context) and Baggage.fromContextOrNull(context) with log using ApiUsageLogger and for Baggage.fromContext(context) now returns empty() when the context is null, also for Baggage.fromContextOrNull(context) returns null. Additionally, added unit tests to cover these scenarios.
I'm happy to update any changes if needed.
Closes #8665