Repository navigation
[1.13] Fixes #31770: restrict direct users to Group teams - #32373
Conversation
❌ 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 |
…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>
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 1 resolved / 1 findingsBackports team user-membership validation to 1.13, restricting direct user assignments to Group teams only for Department, Division, and BusinessUnit teams. Validation is enforced at relationship write boundaries, addressing the issue where ✅ 1 resolved✅ Edge Case: Validating origTeams blocks removing users from legacy teams
OptionsDisplay: 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:
Fixes #31770
Backports the non-Group team user-membership validation to 1.13. Direct user memberships are now rejected for Department, Division, and BusinessUnit teams across team and user write paths. Existing invalid data requires the agreed DB cleanup; this PR intentionally adds no migration or API bypass.
Type of change:
High-level design:
Validation is at the relationship write boundaries. The shared test bootstrap assigns its users to existing child Group teams, so it remains valid without changing downstream test semantics.
Tests:
TeamResourceITandUserResourceITfor the affected API paths.mvn spotless:applypassed.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes #31770above.