Skip to content

{workflows/eval,ci/github-script}: check for mass and NixOS test rebuilds targeting master/release-* branches - #481205

Merged
philiptaron merged 4 commits into
NixOS:masterfrom
mdaniels5757:warn-based-on-rebuild-count
Jan 19, 2026
Merged

philiptaron merged 4 commits into
NixOS:masterfrom
mdaniels5757:warn-based-on-rebuild-count

Conversation

@mdaniels5757

@mdaniels5757 mdaniels5757 commented Jan 18, 2026 •

Copy link
Copy Markdown
Member

Per discussion in infra matrix channel.

Commits

  • ci/supportedBranches: export split()
    Needed for check-target-branch

  • ci/github-script/reviews: rework dismissal/non-posting logic
    Dismissals are done automatically by commits.js, even for reviews from
    check-target-branches.js. This is not desirable.

    The solution is
    (1) do not decline to post a review because it was already dismissed
    (because it may have not been dismissed by a human, and circumstances may
    have changed), and
    (2) reword the auto-dismissal message to not imply that whatever
    problems were present are fixed.

  • ci/github-script/reviews: allow leaving review comments

  • {workflows/eval,ci/github-script}: check for mass rebuilds targeting master/release-* branches
    Check if a PR was made against the wrong branch based on rebuild amount.

Screenshots

Screenshot 2026-01-18 210101 Screenshot 2026-01-18 210117 Screenshot 2026-01-18 210131

Things done


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci 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. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-25.11 labels Jan 18, 2026
@mdaniels5757
mdaniels5757 force-pushed the warn-based-on-rebuild-count branch 2 times, most recently from 68322cc to 5293214 Compare January 19, 2026 02:09
@mdaniels5757 mdaniels5757 changed the title ci/check-target-branch: init {workflows/eval,ci/github-script}: check for mass and NixOS test rebuilds targeting master/release-* branches Jan 19, 2026
Dismissals are done automatically by commits.js, even for reviews from
check-target-branches.js. This is not desirable.

The solution is
(1) do not decline to post a review because it was already dismissed
    (because it may have not been dismissed by a human, and circumstances may
    have changed), and
(2) reword the auto-dismissal message to not imply that whatever
    problems were present are fixed.
@mdaniels5757
mdaniels5757 force-pushed the warn-based-on-rebuild-count branch 3 times, most recently from 35e5d1c to 960feb8 Compare January 19, 2026 17:48
@mdaniels5757
mdaniels5757 force-pushed the warn-based-on-rebuild-count branch from 960feb8 to a4d5f8a Compare January 19, 2026 18:02
Comment on lines +3 to +5
// TODO: should this be combined with the branch checks in prepare.js?
// They do seem quite similar, but this needs to run after eval,
// and prepare.js obviously doesn't.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's your sense of the tradeoffs?

@mdaniels5757 mdaniels5757 Jan 19, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think the main disadvantage to combining them is that it would increase the time to being told you're targeting nixos-* or have commits from another branch from ~30 seconds to ~5 minutes.

It also would require some refactoring of the code I added: it's useful for me to have the early return when !baseClassification.type.includes('primary'), but that doesn't work for the code from prepare.js. It wouldn't be a huge problem (I could just add that to all of the if/elseif conditions), but it would make stuff slightly uglier, I think?

The advantage is keeping similar things together, and removing a bit of duplication.

@philiptaron

Copy link
Copy Markdown
Contributor

I reviewed this commit-by-commit.

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 19, 2026
@philiptaron
philiptaron added this pull request to the merge queue Jan 19, 2026
Merged via the queue into NixOS:master with commit 3334170 Jan 19, 2026
1 of 4 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

@philiptaron

Copy link
Copy Markdown
Contributor

@mdaniels5757 can you look at the bot failures in the actions log?

@mdaniels5757

mdaniels5757 commented Jan 19, 2026 •

Copy link
Copy Markdown
Member Author

@philiptaron I actually had been :) #469363 (comment).

I'll keep looking at it; not quite sure what's wrong...

P.S. Do you think I could be added to the nixpkgs-ci team? Would be nice to be pinged for/help review some of these CI changes.

@philiptaron

Copy link
Copy Markdown
Contributor

Do you think I could be added to the nixpkgs-ci team?

Done, invite in your email.

@wolfgangwalther

wolfgangwalther commented Jan 22, 2026 •

Copy link
Copy Markdown
Contributor

Nice feature!

One thing that I noted on a manual backport PR in #482601:

  • The first push triggered a regular review comment due to conflict solving.
  • Then, there was a second push to add a mass-rebuild commit (pillow). This caused the first review to be replaced.

This is a problem, because the author is not notified about the edited comment, so they don't realize there's a(nother) problem.

I think the comments for mass rebuild checks and commit checks should be entirely separate, so that they don't overwrite each other.

I also noticed that labels won't be set for PRs which have the mass-rebuild-review-comment. This is unfortunate.


Edit: Also note the edit history on #482601 (review) - the two jobs are editing this comment back and forth! :D

@mdaniels5757

Copy link
Copy Markdown
Member Author

I think the comments for mass rebuild checks and commit checks should be entirely separate, so that they don't overwrite each other.

Agreed, I'll work on this.

I also noticed that labels won't be set for PRs which have the mass-rebuild-review-comment. This is unfortunate.

They should be?? I'll look into it.

@mdaniels5757

mdaniels5757 commented Jan 22, 2026 •

Copy link
Copy Markdown
Member Author

I also noticed that labels won't be set for PRs which have the mass-rebuild-review-comment. This is unfortunate.

It should be set by the next scheduled Bot run, at the very least.

@wolfgangwalther

Copy link
Copy Markdown
Contributor

It should be set by the next scheduled Bot run, at the very least.

Probably right, I possibly didn't wait long enough for that to happen.

@zowoq

zowoq commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

#483048

This catches the kernel update backports, had to bypass to merge. Maybe we could check if the PR only touches the kernels-org.json file?

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 Discuss policies to work in and around Nixpkgs 8.has: port to stable This PR already has a backport to the stable release. 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: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants