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

ci: add mergify rules for nixpkgs #360340

Merged
merged 1 commit into from
Dec 6, 2024
Merged

ci: add mergify rules for nixpkgs #360340

merged 1 commit into from
Dec 6, 2024

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Nov 30, 2024

Things done

Context: NixOS/org#38

We already deployed mergify in nixos-hardware: NixOS/nixos-hardware#1249 and in nix https://github.com/NixOS/nix/blob/master/.mergify.yml
This pull requests adds support for it in nixpkgs. Mergify adds support for declarative merge queues to nixpkgs. Merge queues make sure that pull request are tested against the latest base branch. The advantage over github's own merge queues is that, the configuration is part of the repository and therefore does not require a repository admin to keep "Required Checks" in sync with recently added CI checks.
Another advantage mergify has it's that it is a github app. There are many cases where github won't run checks on automated created pull requests. With mergify this is not an issue. If we are happy with the workflow introduced mergify, we can proceed adding it to CONTRIBUTING.md.
We have a similar feature in merge-bot. However it doesn't work very reliable. With mergify, we can later make merge-bot just add a label remove the complicated code and database integration we have just now.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@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 Nov 30, 2024
@Mic92
Copy link
Member Author

Mic92 commented Nov 30, 2024

NixOS/org#39

@JohnRTitor JohnRTitor changed the title add mergify rules for nixpkgs ci: add mergify rules for nixpkgs Dec 1, 2024
.mergify.yml Outdated Show resolved Hide resolved

This comment was marked as spam.

@JohnRTitor JohnRTitor requested a review from infinisil December 3, 2024 14:35
Copy link
Contributor

@JohnRTitor JohnRTitor 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, but I have no way to test this.

@JohnRTitor
Copy link
Contributor

Question: Let's say an workflow only runs on certain paths, like #361447 (on lib/*), if we add that workflow as requirement for mergify, will it work on those PRs where this workflow will not even trigger?

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 3, 2024
@JohnRTitor
Copy link
Contributor

Let's deploy it for now. We can always push a bugfix later, if we need any changes.

@JohnRTitor JohnRTitor merged commit 1becf6e into NixOS:master Dec 6, 2024
30 checks passed
@Mic92
Copy link
Member Author

Mic92 commented Dec 6, 2024

I think we would actually mergify installed for this to work. Doesn't think this is the case just now: NixOS/org#39

@Mic92 Mic92 deleted the mergify branch December 6, 2024 18:13
@zimbatm
Copy link
Member

zimbatm commented Dec 16, 2024

Mergify is now active on the repo

@Mic92
Copy link
Member Author

Mic92 commented Dec 16, 2024

Thanks. Looks like merge queues need to be enabled separately.

@infinisil
Copy link
Member

@Mic92 Enabled now

@arianvp
Copy link
Member

arianvp commented Dec 18, 2024

I just had @Lassulus disable this as it was opening a Pull request per minute

https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aclosed+author%3Amergify%5Bbot%5D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants