Repository navigation
fix(monitor): skip a missing Service Bus subscription per target (closes #3565) - #3589
Merged
Merged
Conversation
…ead of failing the check Closes #3565. `ServiceBusDlqAdapter` and `QueueStalledAdapter` iterate their targets and let the first transport error escape, so one retired or not-yet-deployed subscription (`MessagingEntityNotFoundError` from a peek, `ResourceNotFoundError` from a management read) failed the whole check: the remaining targets went unread and the environment's watermark stayed put. Both adapters now catch those two missing-entity errors per target (matched by class name, so no Azure SDK import), record the target in `skipped_targets` with a "subscription not found" reason, and keep reading. The run summary already prints `skipped_targets` for each check. Any other transport error still fails the check as before. Tests: - tests/test_service_bus_missing_subscription.py — a missing subscription is skipped and reported while the other targets still yield artifacts, for both check types; a non-missing transport error still raises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
ServiceBusDlqAdapterandQueueStalledAdapteriterate their targets and let the first transport error escape. One retired or not-yet-deployed subscription (MessagingEntityNotFoundErrorfrom a peek,ResourceNotFoundErrorfrom a management read) failed the whole check: the remaining targets went unread and the environment's watermark stayed put.Fix
Both adapters catch those two missing-entity errors per target (matched by class name, so no Azure SDK import), record the target in
skipped_targetswith a "subscription not found" reason, and keep reading. The run summary already printsskipped_targets, so the operator still sees the missing subscription on every run. Any other transport error still fails the check.Tests
tests/test_service_bus_missing_subscription.py— a missing subscription is skipped and reported while the other targets still yield artifacts, for both check types; a non-missing transport error still raises. Fails on unchanged code.Verification
scripts/smoke-test.sh: 5078 tests OK (skipped=4), smoke test OK.Closes #3565.
🤖 Generated with Claude Code