Repository navigation
Add /nf-core seqera add|remove|list command - #26
Open
adamrtalbot wants to merge 1 commit into
Open
adamrtalbot wants to merge 1 commit into
adamrtalbot wants to merge 1 commit into
Conversation
Admins can now manage Seqera Platform access by named group, for corrections, email mismatches and groups other than megatests. - Groups are SeqeraGroup entries in code (workspace + role, or org team); megatests keeps its workspace ID and role from config. - add/remove/list live in checks/seqera.py; the joiner auto-sync and the weekly removal job reuse them, and the removal job now covers every group. - --email overrides the Slack email. Each add is recorded in DynamoDB, and remove only touches access the bot recorded. - Restricted to @core-team in the router; ephemeral replies; help text and docs updated. Closes #25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F424GbMXjfgHf7HfNRpUj9
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.
Stacked on #24. The base is
feat/seqera-megatests-sync, so the diff only shows this change. Retarget tomainonce #24 merges.Closes #25
Why
The auto-sync in #24 only handles new joiners and the megatests workspace. Admins also need to fix access by hand: when someone's Slack email differs from their Seqera email, and for groups other than megatests.
What
SeqeraGrouptargets either a workspace with a role or an org team.seqera_groups()returnsmegatestsplus anything inSEQERA_GROUPS(checks/seqera.py), so a new group goes through PR review and mypy. Only the token and org ID live in SSM.checks/seqera.pyhasadd_to_group,remove_from_group,remove_recordandgroups_for_user.add_to_megatests(the joiner auto-sync) is now a thin wrapper aroundadd_to_group(..., "megatests"). The weekly removal job loops over every configured group and callsremove_record.--emailoverrides the Slack email. It accepts--email x,--email=x, and Slack's<mailto:…>form.SEQERA#<workspace-id>). Team records useSEQERA#TEAM#<team-id>.removeonly touches access the bot recorded. For anything else it says to remove the person in Seqera Platform, which matches how the removal job already behaves.add. The removal job needs it to check org membership, soaddrefuses when the Slack profile has no GitHub username.@core-teamin_route_seqera(), the same way on-call does it. The router callsack()first, and every reply is ephemeral. Added to the help text,docs/commands.md,docs/deployment.mdandCLAUDE.md.Needs input from reviewers
megatestsstill reads its workspace ID and role fromSEQERA_WORKSPACE_ID/SEQERA_WORKSPACE_ROLE, as Sync nf-core joiners to Seqera workspace #24 set up. I don't have the real numeric IDs, so I haven't hard-coded them, andSEQERA_GROUPSships empty, with a commented example and nomaintainersteam yet. Send me the IDs and I'll move megatests into code and add more groups.POST /orgs/{org}/teams/{team}/membersandDELETE …/members/{memberId}/delete. The spec only lists 400 and 403 errors for team adds, so the 409 "already a member" and 404 "no account" handling is copied from the workspace endpoint and may never trigger for teams. Worth one manual test once a team group exists.Testing
ruff check,ruff format --checkandmypy src/(strict) pass.pytest: 641 passed. The newtests/test_seqera_command.pycovers team add/remove URLs and records, not-managed and unknown-group cases,--emailparsing, handler replies,listin both forms, removal-sync coverage of team groups, and the router gate.tests/test_seqera.pyis updated forremove_record.Generated by Claude Code