Repository navigation
fix(1.13): clear the pre-existing Java IT failures blocking every backport PR - #32446
mohityadav766 wants to merge 4 commits into
Conversation
…icsearch lane Every 1.13 PR shows the same ~9 integration-test failures regardless of its contents (reproduced on #32391 and #32400, two unrelated backports). They are a branch condition: 1.13 received the product backports but not the follow-up test-stabilization commits that landed on main, and one drive-by product fix that main carried inside an unrelated PR. Cherry-picked from the corresponding main commits, matching PR #32340 byte for byte so this does not conflict when that lands: - TestCaseRepository.updateTestSuite: null/EntityNotFound guard. postDelete on an orphan test case reached copyTestSuite(null) -> NPE on TestSuite.getConnection() and a 500. Guard came from main's #27997 (bulk/async restore), which is why it was never associated with data quality and never backported. - IngestionPipelineOwnerInheritanceIT: assert ApiException + getStatusCode()==403. The 1.13 SDK has no ForbiddenException and no 403 branch, so a 403 arrives as a plain ApiException; the jakarta.ws.rs.ForbiddenException introduced to fix the #29530 backport build made the assertion unsatisfiable rather than correct. - UserTestFactory.getOrCreateUser: look up by name, not email, and treat 409 as already-created. Required by the WorkflowTriggerPermissionsIT fix below -- without it getDataConsumer 404s, retries a create that conflicts, and throws. - WorkflowTriggerPermissionsIT: pin the dataConsumer user in @BeforeAll so SubjectCache resolves it and the authorizer returns 403 instead of 404. - ColumnSearchIndexIT: exact fqnParts term filter under Awaitility instead of a generic q= match plus a fixed sleep. - UserMetricsResourceIT: drop the wall-clock freshness assertions; last_activity is a cluster-wide MAX unrelated to this test's own actions. Verified locally against the mysql-elasticsearch profile (testcontainers MySQL 8.3 + Elasticsearch 9.3): TestCaseDeleteResilienceIT 6/6 pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Both are test-only defects that main fixed and 1.13 never received. They are intermittent, so they did not appear in the #32400 baseline used to scope the previous commit, and only surfaced on the multi-node lane. - RdfGlossaryGraphIT.scopedResponseCarriesGlossaryNameAndIdPerNode awaited only node presence, then asserted `group` and `glossaryId` outside the Awaitility block. The node and its projection land in RDF separately, so on a slower run the node is already present while `group` is still null. Move the whole assertion inside untilAsserted. - WorkflowDefinitionResourceIT.test_WorkflowWithTeamCandidates and test_WorkflowWithReviewersOwnersCandidates created the table before the workflow could consume its creation event, yielding a second approval task ("expected: <1> but was: <2>") or no task at all within the 2 minute wait. Create the table only after the workflow is deployed. Taken from PR #32340 byte for byte, as with the previous commit. Verified locally on the mysql-elasticsearch profile: WorkflowDefinitionResourceIT 49 tests, 0 failures, 0 errors, 5 skipped. Note for anyone reproducing RdfGlossaryGraphIT locally: do not pass -DenableRdf=true. The class starts its own Fuseki container and calls RdfUpdater.initialize in @BeforeAll, so enabling RDF in TestSuiteBootstrap as well fails with "RdfRepository already initialized". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ss-test delete race
Fixes the last family of failures on the mysql lanes, and most of what is left
on postgres-opensearch. Symptom is one of:
Api <entityService> instance for <uuid> not found
Cannot invoke "EntityReference.getFullyQualifiedName()" because
the return value of "Dashboard.getService()" is null
Single root cause: service-backed entity ITs create a fresh service per entity,
so an unqualified listEntities returns rows belonging to sibling tests. When a
sibling's @AfterEach hard-deletes its service mid-list, server-side hydration of
that row's service ref either throws or yields null.
BaseEntityIT gains a getEntityServiceFqn hook (default null, so non-service
entities are unaffected) and pins every unqualified list call to the entity's own
service. Service-backed subclasses override it. Also bumps the hard-delete
visibility wait from 15s to 45s for the change-event pipeline on the
pg-es-redis parallel lane, and waits for accepted async bulk entities before
asserting on them.
Taken from PR #32340 byte for byte, except for two classes it does not cover:
- PipelineResourceIT: same 7-line override; it hits the identical error and is
the class that failed on the postgres-opensearch lane.
- DashboardResourceIT: same override, plus test_listDashboardsByService listed
unscoped with limit=100 and then dereferenced getService() on every returned
row. It builds its own ListParams, so the base-class hook cannot reach it —
scoped the call to the service the test created, which is what a test of that
name was already meant to do. Swept the module for the same shape; this was
the only other instance (DatabaseSchemaResourceIT already scopes via
setDatabase).
AuditLogResourceIT and RecognizerFeedbackRepositoryTest are pre-existing
failures on 1.13 unrelated to this branch (both also fail on #32373, the latter
also on #32371); their #32340 fixes are included since they are test-only.
Verified: test-compile and spotless clean across the module.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| @@ -974,10 +974,12 @@ protected T getEntityIncludeDeleted(String id) { | |||
| @Test | |||
There was a problem hiding this comment.
💡 Quality: Service-scoped list reduces pagination tests to a single row
Each createRequest() creates a fresh parent service (DashboardServiceTestFactory generates a new UUID suffix per call), so scoping the list query to firstEntity's service FQN returns only that one entity. In testAutoPaginationFluentAPI (limit=2) and get_entityListWithPagination_200 the multi-entity/multi-page path is no longer exercised — the lenient assertions (size <= 2, size > 0) pass with a single row, so the stabilization silently guts the coverage these tests were meant to provide. Consider seeding all entities under one shared service (create the service once and reuse its FQN across the 3 creates) so the list is both isolated and actually contains multiple rows.
Was this helpful? React with 👍 / 👎
The openmetadata-service unit lane is red on every 1.13 PR, not just this one: 8 failures on #32400, #32371 and #32373. This branch already showed 6 — a strict subset, the other 2 (AuthenticationCodeFlowHandlerTest) having been fixed by #32408 landing on the base. Nothing here was caused by this branch; these are the remaining 6. Three assert against entities and fields that only exist on main/2.0, having been backported wholesale: - IndexMappingNestedFieldConsistencyTest asserted mappings for auditReport, aiApplication, llmModel and aiGovernance. None of those entities exist on 1.13. - SearchIndexFactoryTest asserted page reindex fields include "parent"; page hierarchy is main-only. - SearchRepositoryBehaviorTest expected the column child index to be aliased cluster_column_search_index; on 1.13 it is cluster_tableColumn. EntityCsvTest covers domain/data-product validation on bulk edit. SearchRepositoryBehaviorTest also gains a test for an EXTERNAL_HANDLER-only change emitting no child-update call, which needs the accompanying SearchRepository fix: appendUpdate/appendDelete/appendCreate appended a separator unconditionally, so a propagation whose switch branch deliberately emits nothing (certification, driven by propagateCertificationTags) produced a whitespace-only script that still fired updateChildren against every child index. The three guards only append the separator when the branch actually wrote something. That makes two product changes on this branch: the TestCaseRepository null/EntityNotFound guard and these three separator guards. Everything else is test-only. Verified locally: EntityCsvTest 63, SearchIndexFactoryTest 200, SearchRepositoryBehaviorTest 115, IndexMappingNestedFieldConsistencyTest 4 — 382 tests, 0 failures, 0 errors. Spotless clean. Taken from PR #32340 byte for byte. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review 👍 Approved with suggestions 1 resolved / 2 findingsClears nine pre-existing Java IT failures blocking 💡 Quality: Service-scoped list reduces pagination tests to a single row📄 openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/BaseEntityIT.java:974-988 📄 openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/BaseEntityIT.java:3387-3401 Each createRequest() creates a fresh parent service (DashboardServiceTestFactory generates a new UUID suffix per call), so scoping the list query to firstEntity's service FQN returns only that one entity. In testAutoPaginationFluentAPI (limit=2) and get_entityListWithPagination_200 the multi-entity/multi-page path is no longer exercised — the lenient assertions (size <= 2, size > 0) pass with a single row, so the stabilization silently guts the coverage these tests were meant to provide. Consider seeding all entities under one shared service (create the service once and reuse its FQN across the 3 creates) so the list is both isolated and actually contains multiple rows. ✅ 1 resolved✅ Edge Case: getOrCreateUser 409 retry can rethrow on name/email mismatch
🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. 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:
Every PR that targets
1.13currently fails the Java integration-test lanes with the same ~9 failures, whatever the PR actually contains. Reproduced on two unrelated backports — #32391 (Pub/Sub credential masking,+62/-0undersecrets/converter) and #32400 (GluedatabaseName) — both reporting the byte-identical12739 tests run, 1192 skipped, 9 failedonmysql-elasticsearch, global-statewith the same nine test names. This is a branch condition, not a property of the PR under test.Root cause:
1.13received the product backports but not the follow-up test-stabilization commits that landed onmain, plus one product guard thatmaincarried inside an unrelated PR.mainand2.0are byte-identical on all of these files, which is why both are green.TestCaseDeleteResilienceIT×3postDeleteon an orphan test case reachescopyTestSuite(null)→ NPE onTestSuite.getConnection()→ 50009af9fc801(#27997)IngestionPipelineOwnerInheritanceIT.test_killRequiresEditPermissionjakarta.ws.rs.ForbiddenException, which the SDK client never throws51ecf4502f(#25894)WorkflowTriggerPermissionsIT×2SubjectCachemiss →EntityNotFoundException→ 404 short-circuits the authorizer before it can return 40396f445146e(#28513)ColumnSearchIndexIT×1–5q=multi-matchesname.ngram; siblings sharing the run prefix trip minimum-should-match1e8dafbf33(#31196)UserMetricsResourceIT×2last_activityis a cluster-wide MAX, so a 10-minute wall-clock bound is arbitrary on a quiet laneTwo of these are worth calling out because they are not ordinary flakes:
TestCaseRepositoryguard was never associated with data quality. It landed onmaininside Fixes #4003: bulk + async restore for large entity hierarchies #27997, "bulk + async restore for large entity hierarchies" — a restore-perf PR that carried the fix as a drive-by. The test (fix(data-quality): delete orphaned test cases + guard test definition deletion #29081) was backported asbba3052ffd; the guard it depends on lives somewhere nobody would look.test_killRequiresEditPermissionhas been deterministically red since 2026-06-29, never a flake. Backporting Fixes #29467: expose Trigger in ingestionPipeline descriptor and require EditAll to kill #29530 broke the build becauseorg.openmetadata.sdk.exceptions.ForbiddenExceptiondoes not exist on1.13. The follow-upe7d845b8ef"Fix Build" swapped the import tojakarta.ws.rs.ForbiddenException, which compiles — but1.13'sOpenMetadataHttpClienthas nocase 403:at all, so a 403 arrives as a plainApiException. The assertion was unsatisfiable from the moment it compiled. This PR assertsApiException+getStatusCode() == 403rather than backporting the whole Task redesign #25894 SDK change.UserTestFactoryis included as a prerequisite, not a drive-by: on1.13getOrCreateUserlooks the user up by email instead of name, sogetDataConsumer404s, retries a create that 409s, and throwsRuntimeException. Without it theWorkflowTriggerPermissionsIT@BeforeAllfails the entire class instead of fixing two tests.Every hunk is taken from PR #32340 byte for byte, so this does not conflict when that lands.
Type of change:
Checklist:
Testing
Built and ran locally against the
mysql-elasticsearchprofile (testcontainers MySQL 8.3.0 + Elasticsearch 9.3.0), in both thesequential-testsandparallel-testsfailsafe phases — the parallel phase matters, because theWorkflowTriggerPermissionsITandColumnSearchIndexITfailures are concurrency- and order-dependent.mvn install -pl openmetadata-service,mvn test-compile -pl openmetadata-integration-testsandmvn spotless:checkon both modules are allBUILD SUCCESS.Scope
Measured against #32400's twelve lanes, this clears 116 of 151 lane-failures and takes every
mysql-elasticsearchlane green:The remaining 35 are deliberately out of scope here. They are two distinct families that map onto the other files in #32340 — FQN-rename cache invalidation (
Classification/Container/Domain/Glossary/GlossaryTermMoveall share the single root cause of stale L1/Redis state after the FQN rewrite) and parallel test isolation (MlModelResourceIT"mlmodelService not found",DashboardDataModelResourceIT,AuditLogResourceITpagination). Duplicating those here would fork a 30-file PR that is already written and mergeable.This PR is the subset worth landing first — five test files plus one seven-line product guard — so that #32391 and every other in-flight
1.13backport stops being blocked on review of the riskierEntityRepository/SearchRepository/ cache changes. #32340 remains the path to full green on the postgres lanes.🤖 Generated with Claude Code