Repository navigation
Post a short replacement when Bugzilla rejects a comment - #433
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The fallback preserves notification metadata, propagates repeated rejection, and has targeted regression coverage.
No open issues 🎉
What changed in this PR
Handles Bugzilla comment rejections without losing the error report or notification metadata.
Changes:
- Detects HTTP 406 responses before parsing JSON.
- Logs rejected comments and posts a short replacement pointing to the task log, preserving needinfo and assignee.
- Adds tests for successful replacement, missing task ID, and repeated rejection.
| File | Description |
|---|---|
| tests/bugzilla.py | Adds rejection simulation and fallback regression tests. |
| components/bugzilla.py | Adds replacement comments and bounded retry handling. |
| apis/bugzilla_api.py | Detects rejected comments and constructs task URLs. |
Review effort: Balanced
Bugzilla's web filter rejects some comments with an empty 406 response, which we failed to parse and crashed on. It has done this for comments quoting shell trace output: aom's moz.build error comment (which quotes the `set -x` output of generate_sources_mozbuild.sh) has been rejected every month since May, so the bug only got the generic "unknown error" comment and the maintainer never saw the actual error. On a 406, log the rejected comment and post a short replacement pointing at the Taskcluster task's log, keeping the needinfo and assignee. If that is rejected too, raise.
tomrittervg
force-pushed
the
2026-10-19-tjr-bugzilla-406-fallback
branch
from
October 19, 2026 18:43
b2f666f to
74dc580
Compare
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.
Bugzilla's web filter rejects some comments with an empty 406 response, which we failed to parse and crashed on. It has done this for comments quoting shell trace output: aom's moz.build error comment (which quotes the
set -xoutput of generate_sources_mozbuild.sh) has been rejected every month since May, so the bug only got the generic "unknown error" comment and the maintainer never saw the actual error.On a 406, log the rejected comment and post a short replacement pointing at the Taskcluster task's log, keeping the needinfo and assignee. If that is rejected too, raise.