Repository navigation
Fix merge-queue flakes: history walk, alert log flood, change-request supersede race, test races - #36970
Conversation
… supersede race, stale child propagation - History walk IT: a concurrent hard delete can leave the last forward page empty and cursorless; the walk now ends on the last page with rows. - ChannelResolution logged every destination at INFO; since validation decrypts unchanged destinations, StoredConfigBoundsTest wrote ~64k lines and timed out. Log at DEBUG, WARN only for an unregistered channel. - CreateTask: the run of a change-request revision that has since been replaced no longer supersedes the newer revision's live review task. - Search: watch background child propagations and reindex the parent when one fails or skips children; queue a parent id in the id column so the retry worker can resolve it. - Test fixes: UserSecretsIT waits for the async change event, PersonaAIContextIT compares both lists in one poll, AssetsTabVersioningIT takes the multi-domain rule lock, and DataProductDomainMigrationIT waits long enough for the retry queue's repair.
… the change-request supersede gate - Poll the background task's status every 5s instead of one long-poll the client's socket timeout would cut off, so no search connection is held while a propagation runs. - Watch only propagateToEntityChildren via a new propagateInheritedFields; deletes, renames and reference rewrites stay unwatched, since a parent reindex cannot repair what they rewrite. - Check the stale revision inside the best-effort supersede, with a gate test that fails when the check is removed; rate-limit the unwatched-task warning; real-OpenSearch tests for the task outcome.
…polling through a failed status read - tableColumn documents are built from their table and the retry worker's reindex does not rebuild them, so their propagation goes out unwatched; every other child group stays watched. - Restore the original retry-queue entry for a failed single-index updateChildren, which delete and reference rewrites use, so a failed repair is not reported as completed. - A status read that fails is retried on the next poll; a task still running at the deadline is logged. Share the active-revision check between attachTask and isActiveRevision.
The owner-propagation flake's cause is not yet reproduced, and a failed background propagation should reuse the search retry queue's propagation replay rather than a new repair path. It will be handled in its own change once reproduced.
Code Review ✅ Approved🟡 Medium risk · Change-request revision checks now gate approval-task supersession; a misread revision could cancel a newer review or leave obsolete tasks active. Fixes four merge-queue flakes: the history walk now skips empty pages, large alerts log resolutions at DEBUG instead of flooding INFO, change-request runs for superseded revisions no longer cancel the live review task, and inherited-field search propagation is watched and repaired via the retry queue when ES tasks fail. No open issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes these merge-queue flakes from 2026-11-01 to 2026-11-03:
BaseEntityIT…test_listEntityHistoryByTimestamp_pagedWalkMatchesUnpaginatedRead,StoredConfigBoundsTest.checkingWhatChangedIsLinearInTheDestinations,WorkflowDefinitionResourceIT.test_heldDescriptionAndPortChangesApplyTogether,DataProductDomainMigrationIT.testDataProductDomainMigrationBackAndForth,AssetsTabVersioningIT.movingAnAssetToAnotherDomain_dropsTheOldDomainsDataProducts,UserSecretsIT.aBotsUpdateIsStoredWithoutItsTokenandPersonaAIContextIT.aiContextStatusPagesWithTheSameCursorAsThePersonaList. Each cause below was traced from the CI logs.StoredConfigBoundsTesttimed out 5 times on unrelated PRsChannelResolution. That logged one INFO line per destination, and its dedup set clears at 10k entries. The test's 32k destinations wrote about 64k lines, which took 6–10 s on CI against a 10 s limit. Large alerts in production produce the same log flood.test_heldDescriptionAndPortChangesApplyTogetherCreateTaskbeforeattachTasknoticed that run was stale. The request was then left with a cancelled task for good.attachTaskcloses that run's own task, as before.BaseEntityIT)0ee19500was deleted at 11:45:57.356 bySubResourceAuthorizationIT's namespace cleanup.DataProductDomainMigrationITPartial shards failureon the synchronous domain update. The search retry queue repaired the docs about 33 s later, just after the 30 s wait.AssetsTabVersioningIT(6 failures since 29 Oct)DomainBulkAssetsDryRunITturns the "Multiple Domains are not allowed" rule off for a few seconds. Moving an asset during that window adds the new domain instead of replacing the old one.@ResourceLock("MULTI_DOMAIN_RULE", READ).UserSecretsITPersonaAIContextITNot in this PR
TableResourceIT.test_ownerPropagationToSearchIndex: the cause has not been found yet. The background update-by-query's result lives only in ES, which CI doesn't keep. Being reproduced separately.EventSubscriptionResourceIT.test_unrelatedPatchCopyWithLegacyNumericHeader: fixed in test: stop the legacy numeric header alert test failing on random names #36963.McpOAuthIT: a MySQL deadlock in the user-delete grant revoke, tracked with the MCP owner.NativeOntologyDataGraph*IT: already fixed by Stabilize ontology data-graph query-budget ITs against one-off cache misses #36843.Type of change:
High-level design:
N/A: nine files with targeted fixes, two of them in product code (
ChannelResolutionlogging and theCreateTasksupersede guard viaChangeRequestService.isActiveRevision).Tests:
Use cases covered
Unit tests
CreateTaskTest+5 tests, including gate tests that fail if the stale-revision check is removed.f58d60d867d:SearchRepository*,SearchIndexRetry*,CreateTask*,ChangeRequestServiceTest, alerting channel tests andUpdateChildrenAsyncPropagationTest. 399 run, 0 failures.Backend integration tests
TableResourceIT,DatabaseResourceIT,DataProductDomainMigrationIT,AssetsTabVersioningIT,UserSecretsIT,PersonaAIContextIT,ChartResourceIT.WorkflowDefinitionResourceIT#test_heldDescriptionAndPortChangesApplyTogether,ChangeRequestLifecycleIT,ChangeRequestDecisionIT,ChangeRequestResourceIT.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Not applicable: these are server-internal fixes and test fixes. The evidence is the CI log analysis above.
UI screen recording:
Not applicable: backend and test changes only.
Checklist:
REVIEW.md, in two passes. The search-watcher findings no longer apply because the watcher was removed. Still open: the missing real-Flowable IT for out-of-order runs, which is timing-dependent.