Skip to content

Various improvements to team member validation - #2703

Open
steffahn wants to merge 1 commit into
rust-lang:mainfrom
steffahn:refactor-duplicate-detection
Open

Various improvements to team member validation#2703
steffahn wants to merge 1 commit into
rust-lang:mainfrom
steffahn:refactor-duplicate-detection

Conversation

@steffahn

Copy link
Copy Markdown
Member
  • refactor the duplication check
  • add checks for duplicate roles of a person in a team
  • check against invalid roles of alumni

supersedes both #2701 and #2702

@github-actions

Copy link
Copy Markdown
Dry-run check results

[WARN  rust_team::sync] sync-team is running in dry mode, no changes will be applied.
[INFO  rust_team::sync] synchronizing crates-io
[INFO  rust_team::sync] synchronizing github

@steffahn
steffahn force-pushed the refactor-duplicate-detection branch 3 times, most recently from 6be2d62 to bb746a7 Compare August 21, 2026 17:49
@steffahn

Copy link
Copy Markdown
Member Author

By running the overlap check only on the already individually-deduplicated list of members+alumni, something like e.g. a duplicate alumni won't result in a sequence of multiple of error messages as it currently does

before

[ERROR rust_team::validate] validation error: team `myteam` has duplicate alumni: foobar
[ERROR rust_team::validate] validation error: team `myteam` has duplicate leads + alumni: foobar
[ERROR rust_team::validate] validation error: team `myteam` has duplicate members + alumni: foobar

after

[ERROR rust_team::validate] validation error: team `myteam` has duplicate alumni: `foobar`

The choice of IndexMap and BTreeSet in the new no_duplicates code produces less arbitrary orderings, no longer based on hashes but on order of (first) occurrence in the files.

@jieyouxu jieyouxu added needs-infra-admin-review This change requires one of the `infra-admins` to review. S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin. labels Aug 28, 2026
@rustbot

This comment has been minimized.

@steffahn

steffahn commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Prepending a revert commit of #2701 and rebasing to remove the merge conflict.

@steffahn
steffahn force-pushed the refactor-duplicate-detection branch from bb746a7 to cf2f39f Compare August 28, 2026 12:54
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@steffahn

Copy link
Copy Markdown
Member Author

All code that #2701 (or its revert) touches are changed here anyway, so I might as well squash it then.

- refactor the duplication check
- add checks for duplicate roles
- check against invalid roles of alumni
@steffahn
steffahn force-pushed the refactor-duplicate-detection branch from cf2f39f to bf4521d Compare August 28, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-infra-admin-review This change requires one of the `infra-admins` to review. S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants