Skip to content

Bug 2065864 - Match webhook event selections exactly - #2724

Merged
dklawren merged 2 commits into
mozilla:masterfrom
loganrosen:loganrosen-fix-bugzilla-2065864
Aug 25, 2026
Merged

Bug 2065864 - Match webhook event selections exactly#2724
dklawren merged 2 commits into
mozilla:masterfrom
loganrosen:loganrosen-fix-bugzilla-2065864

Conversation

@loganrosen

@loganrosen loganrosen commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Bug 1979028 added the attachment_change webhook event, but should_send checked the comma-separated event setting with substring regular expressions. Because attachment_change contains both change and attachment, a webhook configured only for attachment modifications also received bug modification and new attachment events.

This parses the stored setting into exact event tokens before applying the existing routing-key checks. It also uses the exact change token for the moved-product/component fallback, where the same substring collision occurred.

The new connector test covers each event independently, verifies that attachment_change does not leak into the two shorter event names, and exercises combined selections and the moved-product path.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2065864

Testing: test_sanity t/001compile.t t/002goodperl.t t/005whitespace.t extensions/Push/t/webhook.t

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 23, 2026 18:45

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.

Pull request overview

Fixes webhook routing by matching stored event selections as exact tokens.

Changes:

  • Parses comma-separated webhook events into an exact lookup map.
  • Prevents attachment_change from matching unrelated events.
  • Adds regression coverage for individual, combined, and product-move routing.
Show a summary per file
File Description
extensions/Push/lib/Connector/Webhook.pm Uses exact event-token matching.
extensions/Push/t/webhook.t Adds webhook routing regression tests.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@dklawren dklawren left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks r=dkl

@dklawren
dklawren merged commit 07d3a83 into mozilla:master Aug 25, 2026
8 checks passed
@loganrosen
loganrosen deleted the loganrosen-fix-bugzilla-2065864 branch August 25, 2026 02:51
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.

3 participants