Repository navigation
[2.1] Fixes #35869: Add tests for leaving a non-joinable team - #39840
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.1.42bd0d15f09b983087a7fd99e60cbf95d1f49740Resolution notes
Backport notes: PR #39677 → 2.1
Source:
Fixes #35869: Add tests for leaving a non-joinable team(merge commit42bd0d15f0).What this PR does
Adds integration test coverage confirming that leaving a non-joinable ("closed") team requires
an admin, the same way joining one does, and tightens the
isJoinabledescription in the JSONschemas (
createTeam.json,team.json,teamHierarchy.json) to describe that rule. Also amendsthe
only-admins-add-roles-or-policies-to-a-teamdecision record's Guard list.Conflict and resolution
Only
openmetadata-spec/src/main/resources/rdf/ontology/openmetadata.ttlconflicted. This file isgenerated from the JSON schema descriptions. On
main, the generatedom:isJoinablepropertyalready carried a
rdfs:comment/rdfs:domain/rdfs:range(derived from the schema description),so the PR's diff there is just a comment-text update.
On
2.1,om:isJoinableis generated without anyrdfs:comment/domain/range— it has onlyom:projectionStatusandrdfs:label, same as several neighboring boolean properties(
isHidden,isEnabled,isDisabled, …) that share a property name across multiple entityschemas. This is a pre-existing difference in how
2.1's ontology generator renders this file, notsomething introduced by this PR — it predates this change and is unrelated to it.
Resolution: kept
2.1's existing generated shape forom:isJoinable(label only), i.e. no netchange to this file. Adding the comment/domain/range here would mean hand-editing a generated
artifact into a shape
2.1's generator doesn't actually produce, which would drift on the nextreal regeneration.
The three JSON schema files (
createTeam.json,team.json,teamHierarchy.json) and theirgenerated TypeScript counterparts applied cleanly with the updated
isJoinabledescription text,so the user-facing description change is fully ported — only the
.ttlartifact is affected bythe above.
What a reviewer should check
openmetadata-spec/src/main/resources/rdf/ontology/openmetadata.ttlon2.1has nodiff from before this backport (the
isJoinableconflict resolved to a no-op on that file).isJoinabledescription text in the three JSON schemas and their generated.tsfiles matchesmain's wording.UserResourceIT.test_nonAdmin_cannotLeaveClosedTeam,which already exists on
2.1(added by a prior backport), so the Guard list stays accurate.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