Skip to content

Conversation

@dwilson6
Copy link

@dwilson6 dwilson6 commented Nov 25, 2025

What does this PR do?

Fixes a bug in the azure-service-bus instrumentation that breaks the createMessageBatch tryAddMessage method by changing it from a sync method that returns a boolean to an async method returning a promise.

Motivation

Ran into this bug which was causing some code to drop service bus messages when building batches due to returning a promise which is truthy even when the resolved promise would return false but the consuming code is synchronous.

Plugin Checklist

Additional Notes

@dwilson6 dwilson6 marked this pull request as ready for review November 25, 2025 21:33
@dwilson6 dwilson6 requested review from a team as code owners November 25, 2025 21:33
@dwilson6 dwilson6 changed the title Add test to reproduce the bug with tryAddMessage being changed to async Fix a bug with tryAddMessage being changed to async which causes messages to be dropped Dec 3, 2025
@dwilson6 dwilson6 force-pushed the fix-az-service-bus-tryAddMessage-wrapper branch from 4dc8479 to 88fb032 Compare December 3, 2025 16:36
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.83%. Comparing base (f625887) to head (02dee10).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6992      +/-   ##
==========================================
- Coverage   84.84%   84.83%   -0.01%     
==========================================
  Files         517      517              
  Lines       22050    22050              
==========================================
- Hits        18709    18707       -2     
- Misses       3341     3343       +2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dwilson6 dwilson6 force-pushed the fix-az-service-bus-tryAddMessage-wrapper branch from 88fb032 to 02dee10 Compare December 8, 2025 19:36
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.

2 participants