Fix the chronic CISqlServer red: give the DLQ expiration suite its own schema - #3743
Merged
Merged
Conversation
CISqlServer has been red on main since 2a3761d, with all ten dead-letter tests in SqlServerMessageStore_with_DeadLetter_Expiration failing on "Invalid column name 'expires'". DeadLetterQueueExpirationEnabled changes the *shape* of the dead letters table -- it adds the `expires` column and its filtered index. That suite shared the "receiver2" schema with SqlServerMessageStore_with_IdAndDestination_Identity, which drops and recreates the schema from a host that leaves the setting off, while the expiration suite never dropped anything and simply reused whatever was already there. Whichever ran last won. Once the table existed without `expires`, every test that writes a dead letter failed -- and because the schema outlives the process, it stayed broken for later runs against the same database, which is why re-running a single test in isolation still failed on CI. Give the expiration suite a schema of its own so the two can't collide. The ordering coupling is removed rather than papered over with another drop. Note this is only the test isolation half. Wolverine does not migrate an existing dead letters table to add `expires` when DeadLetterQueueExpirationEnabled is turned on, even though AutoCreate defaults to CreateOrUpdate -- a fresh table built by an expiration-enabled host gets the column, an existing one never does. That is a real product bug for anyone enabling the feature on an established database, and is filed separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 31, 2026
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.
CISqlServerhas been red onmainsince2a3761d1d, with all ten dead-letter tests inSqlServerMessageStore_with_DeadLetter_Expirationfailing onInvalid column name 'expires'. It is unrelated to any PR that happens to be sitting under it — it reproduces on a clean checkout ofmain.Root cause
DeadLetterQueueExpirationEnabledchanges the shape of the dead letters table —DeadLettersTableadds theexpirescolumn and its filtered index only when the setting is on.Two compliance suites shared the
receiver2schema:SqlServerMessageStore_with_IdAndDestination_IdentityDropSchemaAsync("receiver2"), then recreatesSqlServerMessageStore_with_DeadLetter_ExpirationWhichever ran last won. Once the table existed without
expires, every test that writes a dead letter failed. And because the schema outlives the process, it stayed broken for subsequent runs against the same database — which is why CI's retry of a single test in isolation still failed.The fix
Give the expiration suite a schema of its own (
receiver_dlq_expiration) so the two cannot collide. This removes the ordering coupling rather than papering over it with a second drop.Verified by reproducing the exact CI failure locally (10 failures, same tests, same message), then re-running the poisoning sequence —
IdAndDestinationfirst, expiration suite second — with the fix: both green (50 and 45 tests).Follow-up: there is also a real product bug here
This PR only fixes the test isolation. Separately, Wolverine does not migrate an existing dead letters table to add
expireswhenDeadLetterQueueExpirationEnabledis switched on, even thoughDatabaseSettings.AutoCreatedefaults toCreateOrUpdate. Confirmed empirically:expires, tests passDatabasePersistencestill emitsinsert ... (expires) values (...)because it reads the flag at runtimeSo any user who turns this feature on against an established database gets a dead-letter queue that throws
Invalid column name 'expires'on every write. Worth its own issue and fix.🤖 Generated with Claude Code