Skip to content

workflows/codeowners: move into PR workflow#434555

Merged
wolfgangwalther merged 5 commits intoNixOS:masterfrom
wolfgangwalther:ci-pr-owners
Aug 20, 2025
Merged

workflows/codeowners: move into PR workflow#434555
wolfgangwalther merged 5 commits intoNixOS:masterfrom
wolfgangwalther:ci-pr-owners

Conversation

@wolfgangwalther
Copy link
Copy Markdown
Contributor

@wolfgangwalther wolfgangwalther commented Aug 17, 2025

This moves the codeowners workflow into the main PR workflow with the following advantages:

  • The check job doesn't run anymore when undrafting a PR, where it's not required, because the OWNERS file's contents didn't change.
  • A valid OWNERS file is now a requirement to merge a PR.
  • The OWNERS file is always checked on the exact same test merge commit that the remainder of the workflows are running on as well.
  • This uses fewer resources, because it only runs a single "request reviewers" job and not two (maintainer + owners).
  • It avoids running and failing the codeowners review job on Pull Requests from development branches like staging-next or haskell-updates.

Also the code structure is cleaner, because everything runs through the PR workflow.

This will delay the review of codeowners until Eval has run. Whether that's good or bad or just different is probably just a matter of opinion.

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.05 labels Aug 17, 2025
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 20, 2025
Preparation to split the whole file.
Allows splitting the workflow file in the next step.
This runs the "check owners" job as part of the main PR workflow, with
multiple advantages:
- The job doesn't run anymore when undrafting a PR, where it's not
required, because the OWNERS file's contents didn't change.
- A valid OWNERS file is now a requirement to merge a PR.
- The OWNERS file is always checked on the exact same test merge commit
that the remainder of the workflows are running on as well.
Changes to this file already trigger a run of this workflow via the PR
workflow, we don't need to run this *another* time.
These two jobs mostly used the same code anyway, so they can easily run
in the same job. This uses fewer resources and avoids running (and
failing) the codeowners review job on Pull Requests from development
branches like staging-next or haskell-updates.

It also opens the door for more improvements later on, for example it
will be much easier to implement a shared reviewer limit for both owners
and maintainers now.
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 20, 2025
Copy link
Copy Markdown
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Reading through each commits' diff, I can't see any issues. I also agree with the motivation of the PR.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 20, 2025
@wolfgangwalther wolfgangwalther merged commit c51fabf into NixOS:master Aug 20, 2025
47 of 50 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-pr-owners branch August 20, 2025 15:15
@wolfgangwalther
Copy link
Copy Markdown
Contributor Author

Will have to double check that both workflows work fine after merge - can't fully test these in a fork, because all the codeowners are not part of my user's org.

@nixpkgs-ci
Copy link
Copy Markdown
Contributor

nixpkgs-ci bot commented Aug 20, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Aug 20, 2025
@wolfgangwalther
Copy link
Copy Markdown
Contributor Author

Will have to double check that both workflows work fine after merge - can't fully test these in a fork, because all the codeowners are not part of my user's org.

Worked fine in #435302.

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.

3 participants