Skip to content

test: stop the legacy numeric header alert test failing on random names - #36963

Merged
manerow merged 1 commit into
mainfrom
fix/legacy-numeric-header-it-secret
Nov 3, 2026
Merged

manerow merged 1 commit into
mainfrom
fix/legacy-numeric-header-it-secret

Conversation

@manerow

@manerow manerow commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

EventSubscriptionResourceIT.test_unrelatedPatchCopyWithLegacyNumericHeader has failed 4 times in the merge queue since 2 November, on all three integration lanes and on different PRs. Each time it fails with:

A destination secret cannot be copied or moved out of its field; it was found at '/displayName'

Why it happened

The test stores 123 as a webhook header secret, then sends a PATCH that copies the alert's name into displayName. The test expects that PATCH to be allowed.

The alert name has a random 32-character id in it, for example legacy_numeric__6ef9f9bdcf86406997f123972beb0f01__.... The secret check looks for each secret inside any text the PATCH changes. So when the random id happens to contain 123, the check decides the secret was copied into displayName and refuses the PATCH. That happens on roughly 1 run in 140.

All 4 failing runs had 123 in the id. The passing runs we checked did not.

What this PR changes

The test now uses 987654321 as its secret instead of 123. That number is long enough that it will not turn up in a random id by chance. batchSize is still set to the same number as the secret, so the test still checks what it was written for: an untouched number field that equals the secret must not be refused.

Test-only change. No server code changes.

How it was tested

EventSubscriptionResourceIT on Postgres: 246 cases, 0 failures.

@manerow manerow added safe to test Add this label to run secure Github workflows on PRs backend skip-pr-checks Bypass PR metadata validation check labels Nov 3, 2026
@gitar-bot

gitar-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk · Changing only numeric test data in one integration test leaves production behavior and interfaces unchanged, with impact limited to that test's coverage.

Test-only change swapping the legacy numeric header secret from 123 to 987654321 so it no longer collides with random 32-character ids in alert names, which caused intermittent merge-queue failures on EventSubscriptionResourceIT.test_unrelatedPatchCopyWithLegacyNumericHeader. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow
manerow merged commit 3537e0d into main Nov 3, 2026
96 checks passed
@manerow
manerow deleted the fix/legacy-numeric-header-it-secret branch November 3, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants