-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
check-meta: add a teams attribute #394797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RossComputerGuy
merged 5 commits into
NixOS:master
from
RossComputerGuy:feat/meta-teams
Apr 20, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
650eb61
check-meta: add a teams attribute
RossComputerGuy e2b2bc4
docs: add new meta.teams
RossComputerGuy a71ef34
ci/eval/compare: add meta.teams
RossComputerGuy e5306ea
ci/eval/compare: support optional byName argument
numinit 0173b12
maintainers/scripts: add get-maintainer-pings-between.sh
numinit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| #!/usr/bin/env nix-shell | ||
| #!nix-shell -i bash -p git jq | ||
|
|
||
| # Outputs a list of maintainers that would be pinged across two nixpkgs revisions. | ||
| # Authors: | ||
| # Morgan Jones (@numinit) | ||
| # Tristan Ross (@RossComputerGuy) | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if [ $# -lt 2 ]; then | ||
| echo "Usage: $0 <rev-from> <rev-to>" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| repo="$(git rev-parse --show-toplevel)" | ||
| system="$(nix-instantiate --eval --expr builtins.currentSystem)" | ||
| rev1="$(git -C "$repo" rev-parse "$1")" | ||
| rev2="$(git -C "$repo" rev-parse "$2")" | ||
|
|
||
| echo "Touched files:" >&2 | ||
| git -C "$repo" diff --name-only "$rev1" "$rev2" \ | ||
| | jq --raw-input --slurp 'split("\n")[:-1]' | tee "$TMPDIR/touched-files.json" >&2 | ||
|
|
||
| # Runs an eval in the given worktree, outputting the path to $TMPDIR/$1.path. | ||
| # $1: The revision SHA. | ||
| eval_in_worktree() ( | ||
| mkdir -p .worktree | ||
| local rev="$1" | ||
| local tree=".worktree/$rev" | ||
| if [ ! -d "$tree" ]; then | ||
| git -C "$repo" worktree add -f -d "$tree" "$rev" >&2 | ||
| fi | ||
| cd "$tree" | ||
|
|
||
| local workdir="$TMPDIR/$rev" | ||
| rm -rf "$workdir" | ||
| mkdir -p "$workdir" | ||
|
|
||
| nix-build ci -A eval.attrpathsSuperset -o "$workdir/paths" >&2 | ||
| mkdir -p "$workdir/intermediates" | ||
| nix-build ci -A eval.singleSystem \ | ||
| --arg evalSystem "$system" \ | ||
| --arg attrpathFile "$workdir/paths/paths.json" \ | ||
| --arg chunkSize ${CHUNK_SIZE:-10000} \ | ||
| -o "$workdir/intermediates/.intermediate-1" >&2 | ||
|
|
||
| # eval.combine nix-build needs a directory, not a symlink | ||
| cp -RL "$workdir/intermediates/.intermediate-1" "$workdir/intermediates/intermediate-1" | ||
| chmod -R +w "$workdir/intermediates/intermediate-1" | ||
| rm -rf "$workdir/intermediates/.intermediate-1" | ||
|
|
||
| nix-build ci -A eval.combine \ | ||
| --arg resultsDir "$workdir/intermediates" \ | ||
| -o "$workdir/result" >&2 | ||
| ) | ||
|
|
||
| eval_in_worktree "$rev1" & | ||
| pid1=$! | ||
| eval_in_worktree "$rev2" & | ||
| pid2=$! | ||
|
|
||
| wait $pid1 | ||
| wait $pid2 | ||
|
|
||
| path1="$TMPDIR/$rev1" | ||
| path2="$TMPDIR/$rev2" | ||
|
|
||
| # Use the repo this script was executed in to get accurate maintainer info | ||
| nix-build "$repo/ci" -A eval.compare \ | ||
| --arg beforeResultDir "$path1/result" \ | ||
| --arg afterResultDir "$path2/result" \ | ||
| --arg touchedFilesJson "$TMPDIR/touched-files.json" \ | ||
| --arg byName true \ | ||
| -o comparison | ||
|
|
||
| echo "Pinged maintainers (check $repo/comparison for more details)" >&2 | ||
| jq < comparison/maintainers.json | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the latter part of this comment is now inaccurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done