Skip to content
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

workflows/eval: fix maintainer requests #370456

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Jan 3, 2025

Fixes the problems after #366046, including:

This reuses part of a script that deals with requests from code owners introduced in #336261

Best reviewed commit-by-commit

Things done


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: policy discussion 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Jan 3, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 3, 2025
@infinisil infinisil force-pushed the fix-maintainer-requests branch 2 times, most recently from fd82e60 to b1924a1 Compare January 3, 2025 02:52
@infinisil infinisil marked this pull request as ready for review January 3, 2025 03:05
We can reuse the new process-reviewers.json part for requesting
reviews from maintainers.
Filters out the PR author and avoids rerequesting reviews from people
that already left a review. In a future commit, this can be expanded to
also avoid requesting reviews from people not in the org
The ${{ }} syntax is best avoided in scripts. While it wouldn't be a
problem here, let's do this for consistency
Copy link
Contributor

@SigmaSquadron SigmaSquadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I left a couple of comments that can just be marked as resolved, they're questions and praise; not actionable issues. I can't find anything wrong with this.

ci/request-reviews/process-reviewers.sh Show resolved Hide resolved
.github/workflows/eval.yml Show resolved Hide resolved
Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@GGG-KILLER
Copy link
Contributor

GGG-KILLER commented Jan 3, 2025

@infinisil is the following error from this PR?
It doesn't seem to fail the build, but something we should take into account most likely:

This seems to arise from users not being contributors to the repo, however I think tit might be nice to omit the output as it might confuse people analyzing the logs: https://github.com/Infinisil-s-Test-Organization/nixpkgs/actions/runs/12592351001/job/35096822060#step:6:34

{"message":"Not Found","documentation_url":"https://docs.github.com/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator","status":"404"}gh: Not Found (HTTP 404)

@infinisil
Copy link
Member Author

@GGG-KILLER I think it's better to show those errors, because it could also happen that it fails for a reason other than the user not being a collaborator, e.g. if GitHub is down. Without the error message we couldn't distinguish between the causes.

@infinisil
Copy link
Member Author

I agree that it's not ideal though, I think this could be improved in a future PR.

Copy link
Contributor

@GGG-KILLER GGG-KILLER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and tests look fine as well. Thanks for quickly implementing a fix for this!

@SigmaSquadron SigmaSquadron added the 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people label Jan 3, 2025
@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people labels Jan 3, 2025
@JohnRTitor JohnRTitor changed the title Fix maintainer requests workflows/eval: fix maintainer requests Jan 3, 2025
@JohnRTitor JohnRTitor merged commit 9fb52ee into NixOS:master Jan 3, 2025
54 of 55 checks passed
@emilazy emilazy added the backport release-24.11 Backport PR automatically label Jan 3, 2025
@nix-backports
Copy link

nix-backports bot commented Jan 3, 2025

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-370456-to-release-24.11 origin/release-24.11
cd .worktree/backport-370456-to-release-24.11
git switch --create backport-370456-to-release-24.11
git cherry-pick -x 0371b7fb4b8d3f69f6cf7f1a7192a3c55b362006 0ebab0bccadbd38d9bc0aae3e53e9493afa9ec0b ab248be504bc38a3ea0f7409d31109b45e619224 077007a65827b7c8127458adf2c3661b91fc5545

@wolfgangwalther
Copy link
Contributor

Backport is included in #370709.

@emilazy
Copy link
Member

emilazy commented Jan 3, 2025

@infinisil
Copy link
Member Author

infinisil commented Jan 4, 2025

@emilazy That's weird, by manually using the review request UI to check individually, I figured out that among the maintainers that would've been requested for that PR, only the user @pleshevskiy can't be requested for a review, even though they're a repo collaborator as part of the Nixpkgs maintainers team. The account looks "archived", but GitHub provides no such feature, and https://api.github.com/users/pleshevskiy doesn't show anything odd 🤔. I've also messaged pleshevskiy on Matrix to ask for help.

@JohnRTitor
Copy link
Contributor

Can we just reuse the logic Ofborg uses for this?

@Moraxyc
Copy link
Contributor

Moraxyc commented Jan 4, 2025

FYI: https://github.com/NixOS/nixpkgs/actions/runs/12609376751/job/35142923617?pr=361515

gh: Review cannot be requested from pull request author. (HTTP 422)
{"message":"Review cannot be requested from pull request author.","documentation_url":"[https://docs.github.com/rest/pulls/review-](https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request)

@wolfgangwalther
Copy link
Contributor

FYI: https://github.com/NixOS/nixpkgs/actions/runs/12609376751/job/35142923617?pr=361515

This should be fixed by #370824.

@wolfgangwalther
Copy link
Contributor

I figured out that among the maintainers that would've been requested for that PR, only the user @pleshevskiy can't be requested for a review

ofborg seems to be able to figure that out, see the last PR for sonic-server in #320496.

r-ryantm mentioned pleshevskiy as a maintainer in the comment, but ofborg didn't request review from them.

@wolfgangwalther
Copy link
Contributor

wolfgangwalther commented Jan 4, 2025

ofborg seems to be able to figure that out

Or maybe not, seems like ofborg just requests reviews 1-by-1 and is OK with failing some of them?

https://github.com/NixOS/ofborg/blob/1ef14d9c5b570b110d045795b4e80a37db2e1f0a/ofborg/src/tasks/eval/nixpkgs.rs#L553-L577

@wolfgangwalther
Copy link
Contributor

Or maybe not, seems like ofborg just requests reviews 1-by-1 and is OK with failing some of them?

Created #370857 to do the 1-by-1 request.

@wolfgangwalther
Copy link
Contributor

@emilazy That's weird, by manually using the review request UI to check individually, I figured out that among the maintainers that would've been requested for that PR, only the user @pleshevskiy can't be requested for a review, even though they're a repo collaborator as part of the Nixpkgs maintainers team. The account looks "archived", but GitHub provides no such feature, and https://api.github.com/users/pleshevskiy doesn't show anything odd 🤔. I've also messaged pleshevskiy on Matrix to ask for help.

Your assumption was correct, see the same PR with the fix applied:

https://github.com/NixOS/nixpkgs/actions/runs/12613829223/job/35152198458?pr=370749

It only fails for pleshevskiy.

(It also shows we need to apply a limit - we requested review from all 30 potential reviewers there)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 2 This PR was reviewed and approved by two reputable people backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants