Repository navigation
Fix the integration tests failing on 2.1 and the service-connection wipe (backport 2.1 #37725) - #37850
Conversation
…e service-connection wipe, the parallel-lane timeout (#37725) * test(it): fix 13 integration tests main has failed since merges skipped ITs Each test was broken by a later PR whose behaviour change is intended and recorded, but merged without the integration lanes running: - IncidentGroupsIT x3, MetricMigrationIT: the 2.1.0 incident backfill now requires a testCase parentOf row (#37054); seed it like the write path does. - TeamResourceIT x2: only admins add team roles (ADR 2026-10-30) and every CSV row needs EDIT_ALL on its own team (ADR 2026-11-02). - DomainMoveApprovalAuthorizationIT, DomainReassignmentAuthorizationIT: a JSON Patch on the document root is refused with 400 (ADR 2026-11-03). - AIContextMcpIT: a metric child the caller cannot view is dropped (ADR 2026-10-31); amend the 2026-10-29 record that said otherwise. - OntologyDraftQueryIT: the release scope needs an active release first. - TaskResourceIT: field paths end in tags/description (#37051). - OntologyBulkIT: the two glossaries of one test shared a name. - DataContractResourceIT x2: unknown imported fields are carried as source metadata, and an imported numeric-unsafe rule is stored as an embedded custom rule (ADR 2026-11-09). * test(it): address self-review on the main IT fixes Tighten the DataContract export assertion to the exporter's message, drop the TeamResourceIT Javadoc clause the removed step proved, and note in the metric ADR amendment that the VIEW_ALL expression filter has no caller in the suite that can reach it. * fix: keep a service's connection on a PUT that omits it; unblock the IT lanes - ServiceEntityRepository: a PUT without `connection` now keeps the stored connection, as #32920 and issue #29494 intend and DatabaseServiceResourceIT.put_updateWithoutConnection_preservesExistingConnection_200 asserts. Each generated service types its own setter, so the stored connection is copied in place through its JSON form. Stored ciphertext and vault references pass through storage unchanged (ADR 2026-10-29 service-connection-secrets-are-written-only-during-storage). - NativeOntologyEveryPackInstallIT moves to the global-state lane. Its @isolated 11-15 minute install of every pack pushed the parallel lane past its 65 minute budget; the global-state lane runs beside it with headroom and every pack still installs on each merge (ADR 2026-11-06). - DataProductDeleteRaceIT matches lock waiters by table on MySQL too: a run waited the full minute on a blocked statement that did not carry the data product's id. * fix: an approval-held PUT without a connection must not clear it either The approval gate staged a PUT that omits `connection` as `connection: null`, so approving it would still delete the credentials. Services now declare `connection` and `serviceAttributes` as fields a PUT keeps, matching the updater. Records the decision and its security reasoning in ADR 2026-11-13-a-put-that-omits-a-service-connection-keeps-the-stored-one. SecretsManagerNullSecretIT covers both paths against the in-memory vault: a direct PUT keeps the connection and its vault secrets, and a held PUT stages no connection op (fails without the override). DataProductDeleteRaceIT moves to the serial global-state lane and matches whole table names, so no other test's lock wait can stand in for its own. * docs(adr): state what an omitted connection lost before the fix, as tested A red run of the old updater shows the service row losing its connection while the vault entries were still present right after the PUT, so the record no longer claims the vault entries were deleted. (cherry picked from commit a634c55)
…tDeleteRaceIT On CI the innodb_trx statement text never matched the blocked statements, so each race step only ended when a request hit MySQL's 50s lock-wait timeout, and one step outlived the 60s wait. data_lock_waits joined to data_locks names the table each blocked transaction waits on, independent of the statement text. Locally the three races now take 1.7-3.8s on MySQL instead of about 50s.
Code Review ✅ Approved 🔴 High riskPreserving omitted service connections on PUT could keep services using stale credentials when clients expect omission to clear them; clearing now requires PATCH. Backports the integration test fixes from #37725 to 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:
Backport of #37725 to
2.1, plus a fix for the one test #37725 left failing. No issue: this is a test fix, carrying one production fix.Every PR that broke these tests on
mainis already on2.1(#37054, #36952, #36695, #36077, #36764, #37051, #36043, #37450, #37617, #37489, #32920), so2.1has the same failures and needs the same fixes.#37725 (cherry-picked with
-x)connectionnow keeps the stored one. Before this fix the PUT returned 200 and the service lost its connection.connection: null.NativeOntologyEveryPackInstallITandDataProductDeleteRaceITto the global-state lane. Onmainthe parallel lane then finished in 64m, under its 65m budget.pom.xmllane lists.2.1keeps its own lists and gains only those two classes.ContextMemoryExtractionRequestITis not on2.1, so it is left out.DataProductDeleteRaceITprobe fix (new commit;mainneeds it too)information_schema.innodb_trxand never matched the blocked statements.innodb_lock_wait_timeout. In run 43404107196 two tests took 50.8s and 50.7s.mainafter Fix every integration-test failure on main: 14 stale/broken tests, the service-connection wipe, the parallel-lane timeout #37725.performance_schema.data_lock_waitsjoined todata_locks. That names the table each blocked transaction waits on and does not depend on statement text.pg_stat_activityprobe.Not included:
CredentialDatabaseOutageITfails onmainbecause of #37704 (McpAvailabilityFilterreads the database before the 503 path). #37704 is not on2.1.Type of change:
High-level design:
Not applicable — a backport plus one test-probe change.
Tests:
Backend integration tests
Run on this branch (
2.1+ the backport) withmvn -B verify -pl :openmetadata-integration-tests -am -P<engine> -DintegrationTests.lane=<lane> -Dit.test=…:DataProductDeleteRaceIT,MetricMigrationIT,NativeOntologyEveryPackInstallIT(-Dontology.packs.only=foaf)OntologyBulkIT,IncidentGroupsIT,DomainReassignmentAuthorizationIT,DomainMoveApprovalAuthorizationIT,OntologyDraftQueryIT,AIContextMcpIT,DatabaseServiceResourceIT,SecretsManagerNullSecretIT+ the fixedTaskResourceIT,TeamResourceIT,DataContractResourceITmethodsAll 16 methods #37725 fixed or added are confirmed passing in the reports.
Not run locally: PG+ES+Redis, and all 16 ontology packs. #37725's full CI runs on
mainpassed every lane except the global-state lane fixed here.Unit tests / Ingestion / Playwright
Not applicable: no unit-tested logic, ingestion or UI changes beyond #37725.
Checklist:
Fixes <issue-number>: <short explanation>— test-fix backport,skip-pr-checks.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
This backport preserves stored service connections when a PUT omits
connectionand keeps the approval gate from staging that omission as a deletion.No actionable issues were found. This review used source inspection; no tests were run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Service PUT omits connection] --> B{Held for approval?} B -->|Yes| C[Do not stage a connection change] B -->|No| D[Copy the stored connection] D --> E[Store through existing secret protection] C --> F[Review only the requested changes]Reviews (1) · Last reviewed commit: "test(it): read MySQL lock waits from per..." · Reviewed by Greptile