Skip to content

Post a short replacement when Bugzilla rejects a comment - #433

Merged
tomrittervg merged 1 commit into
masterfrom
2026-10-19-tjr-bugzilla-406-fallback
Oct 19, 2026
Merged

tomrittervg merged 1 commit into
masterfrom
2026-10-19-tjr-bugzilla-406-fallback

Conversation

@tomrittervg

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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
tomrittervg force-pushed the 2026-10-19-tjr-bugzilla-406-fallback branch from b2f666f to 74dc580 Compare October 19, 2026 18:43
@tomrittervg
tomrittervg merged commit 65af4c3 into master Oct 19, 2026
16 checks passed
@tomrittervg
tomrittervg deleted the 2026-10-19-tjr-bugzilla-406-fallback branch October 19, 2026 19:00
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