Repository navigation
[2.0] Fixes #35869: Add tests for leaving a non-joinable team - #39841
Open
gh-bot-collate[bot] wants to merge 1 commit into
Open
gh-bot-collate[bot] wants to merge 1 commit into
gh-bot-collate[bot] wants to merge 1 commit into
Conversation
* Fixes #35869: Test and document that leaving a closed team needs an admin Leaving a team that is not joinable already needs an admin on user PUT, PATCH and CSV import (UserRepository.changesClosedTeamMembership). Add the missing ITs: swapping a closed team for an open one by PUT and PATCH is refused and keeps the team's default role, leaving an open team still works, and an admin still removes a user from a closed team. Describe the rule on isJoinable and record it in the closed-team decision record. * Correct isJoinable description and trim decision record On a team that is not joinable, members are added or removed by an admin editing the user, or by anyone allowed to edit the team's users editing the team. The description now says so. The decision record's v4 entry only adds the new tests to its Guard list. (cherry picked from commit 42bd0d1)
Author
|
🤖 This backport will not merge itself: |
5 tasks done
Contributor
|
🤖 This backport is red, so it will not merge itself. @sonika-shah Failing: The change is not on |
This branch has not been deployed
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.
Automated backport of #39677 to
2.0.42bd0d15f09b983087a7fd99e60cbf95d1f49740Resolution notes
Backport notes: PR #39677 → 2.0
Source:
42bd0d15f09b983087a7fd99e60cbf95d1f49740("Fixes #35869: Add tests forleaving a non-joinable team")
Conflicts and resolutions
docs/decisions/2026-10-30-only-admins-add-roles-or-policies-to-a-team.md— resolved by keeping it absentThis decision record does not exist on
2.0at all (git logshows no commitever added it here), even though it does exist on
2.1(e.g.7d1fc61240"Tidy the team grant decision record wording (#38957) (#38958)"landed on
2.1, never on2.0). The PR's only change to this file isappending a "v4" amendment to the existing v1–v3 history. Since the base
document was never backported to
2.0, there is no coherent file to amend —recreating it here would mean fabricating the v1–v3 sections, which were
never part of this PR.
The underlying feature this ADR documents (
UserRepository.changesClosedTeamMembership,enforced in
UserResource) is present on2.0, so no functional gapexists; only the documentation file is missing. I left the file deleted,
matching
2.0's existing state. Reviewer should double check this matchesproject convention for this branch (i.e., that decision records are
intentionally not backported to
2.0) rather than being an oversight.openmetadata-spec/src/main/resources/rdf/ontology/openmetadata.ttl— resolved by keeping2.0's version unchangedThe only change in the source commit is to the
rdfs:commentonom:isJoinable. On2.0, the generated ontology predates the richergenerator used on
main: theom:isJoinableentry here has nordfs:comment/rdfs:domain/rdfs:rangeat all (justom:projectionStatusandrdfs:label). The conflict was purely a sideeffect of
main's ontology generator having evolved independently of thisPR. Since there is no comment field to update in
2.0's format, I kept2.0's version of this file untouched (git checkout --ours).Clean cherry-picks (no manual changes needed)
openmetadata-integration-tests/.../UserTeamAssignmentPrivilegeIT.java— newtests
test_selfUpdate_cannotLeaveClosedTeam,test_selfUpdate_canLeaveOpenTeam,test_adminRemoval_fromClosedTeam_stillWorksplus supporting helpers (
patchTeams,usersPath,removeFirstTeam)applied cleanly; all referenced helpers/fields already exist on
2.0.openmetadata-spec/.../createTeam.json,team.json,teamHierarchy.json—isJoinabledescription update applied cleanly.createTeam.ts,team.ts,teamHierarchy.ts) —regenerated description text applied cleanly (not regenerated by me; ported
as part of the cherry-pick diff since
make generate/schema codegen wasn'tre-run here).
What to check by hand
2.0is correctproject policy, not a gap that should also be fixed in this PR.
.ttlfile has zero diff vs2.0's currentHEADafter resolution —verify no actual ontology regeneration is expected on this branch for
this change.
Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #39677 is asked to look.
resolver run