Draft
Conversation
957b53a to
4c2c6f4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces organization team member (users + system accounts) support across declarative planning/execution and adds get org team member ... CLI commands, along with E2E scenarios to validate apply/sync/plan workflows.
Changes:
- Add a
membersblock underorganization_teamdeclarative resources and extract member resources for planning/execution. - Implement Konnect SDK/state/planner/executor support for team membership CRUD (add/remove) and identity lookup.
- Add CLI commands to list team members (all, users-only, system-accounts-only) and add E2E scenarios covering apply/sync/plan flows.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/scenarios/org/teams/members/sync/testdata/team-members.yaml | Test fixture for sync-mode team system account membership. |
| test/e2e/scenarios/org/teams/members/sync/scenario.yaml | E2E scenario validating sync create/swap/idempotency for team members. |
| test/e2e/scenarios/org/teams/members/sync/overlays/003-sync-remove-member/team-members.yaml | Overlay fixture to validate member removal/addition in sync. |
| test/e2e/scenarios/org/teams/members/plan/sync-workflow/testdata/team-members.yaml | Test fixture for plan(sync) workflow membership changes. |
| test/e2e/scenarios/org/teams/members/plan/sync-workflow/scenario.yaml | E2E scenario validating plan(sync) then apply via sync --plan. |
| test/e2e/scenarios/org/teams/members/plan/sync-workflow/overlays/003-remove-member/team-members.yaml | Overlay fixture to validate plan(sync) member swap. |
| test/e2e/scenarios/org/teams/members/plan/apply-workflow/testdata/team-members.yaml | Test fixture for plan(apply) workflow membership changes. |
| test/e2e/scenarios/org/teams/members/plan/apply-workflow/scenario.yaml | E2E scenario validating plan(apply) + diff + apply + idempotency. |
| test/e2e/scenarios/org/teams/members/apply/testdata/team-members.yaml | Test fixture for apply-mode team system account membership. |
| test/e2e/scenarios/org/teams/members/apply/scenario.yaml | E2E scenario validating apply + member listing + idempotency. |
| internal/konnect/helpers/sdk_mock.go | Extend SDK mock to provide TeamMembership API. |
| internal/konnect/helpers/sdk.go | Extend SDK interface/implementation to expose TeamMembership API. |
| internal/konnect/helpers/organization_team_membership.go | New helper wrapping SDK endpoints for team membership + identity listing. |
| internal/declarative/state/client.go | Add state client methods for listing/adding/removing team users/system accounts and identity lookup. |
| internal/declarative/resources/types.go | Add resource types and ResourceSet collections for extracted team member resources. |
| internal/declarative/resources/organization_team_user.go | New declarative resource type for organization team user membership. |
| internal/declarative/resources/organization_team_system_account.go | New declarative resource type for organization team system-account membership. |
| internal/declarative/resources/organization_team.go | Add members block support and member validation/default traversal. |
| internal/declarative/planner/organization_team_planner.go | Plan CREATE/DELETE changes for team membership in sync/apply flows. |
| internal/declarative/planner/constants.go | Define planner resource type constants for team membership resources. |
| internal/declarative/loader/loader.go | Extract team member resources from team members block during load. |
| internal/declarative/executor/organization_team_user_adapter.go | New executor adapter to add/remove users from teams. |
| internal/declarative/executor/organization_team_system_account_adapter.go | New executor adapter to add/remove system accounts from teams. |
| internal/declarative/executor/executor.go | Wire new membership executors and resolve organization team references. |
| internal/cmd/root/products/konnect/organization/team/members/members.go | New member command group + shared flags + team ID/name resolution helpers. |
| internal/cmd/root/products/konnect/organization/team/members/getMembers.go | Implement get org team member to list both users and system accounts. |
| internal/cmd/root/products/konnect/organization/team/members/users/users.go | Add get org team member users command. |
| internal/cmd/root/products/konnect/organization/team/members/users/getUsers.go | Implement listing/filtering of team users. |
| internal/cmd/root/products/konnect/organization/team/members/systemaccounts/systemaccounts.go | Add get org team member system-accounts command. |
| internal/cmd/root/products/konnect/organization/team/members/systemaccounts/getSystemAccounts.go | Implement listing/filtering of team system accounts. |
| internal/cmd/root/products/konnect/organization/team/getTeam.go | Attach member subcommands under team get/list command tree. |
| internal/cmd/root/products/konnect/declarative/declarative.go | Pass TeamMembership API into the declarative state client. |
You can also share your feedback on Copilot code review. Take the survey.
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.
This PR adds support for member additions in a team.
We can add a pre-existing user or a system-account to a team.
This is what the declarative UX looks like:
Get and list commands follow the same heirarchy.
The following commands would output all members of a team - users and system-accounts
We can classify them more into specific members and filter based on names, ids and emails (in case of users).
For tests, I have used system-accounts in the scenarios as we can't readily create and delete users.
So, I am testing all functionalities using system-accounts.
Support for adopt and dump would be added in a separate PR.