Skip to content

.github/labeler.yml: automatically add backport label for PRs touching ci/#374921

Merged
wolfgangwalther merged 2 commits intoNixOS:masterfrom
pbsds:feat-auto-label-ci-backport-1737247079
Feb 1, 2025
Merged

.github/labeler.yml: automatically add backport label for PRs touching ci/#374921
wolfgangwalther merged 2 commits intoNixOS:masterfrom
pbsds:feat-auto-label-ci-backport-1737247079

Conversation

@pbsds
Copy link
Member

@pbsds pbsds commented Jan 19, 2025

I assume it makes sense to keep master and stable in sync since these folders are also used in downstream tools such as nixpkgs-review

Things done

  • 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.

@pbsds pbsds requested a review from infinisil January 19, 2025 00:43
@pbsds pbsds marked this pull request as ready for review January 19, 2025 00:43
@github-actions github-actions bot added 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 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 19, 2025
Copy link
Contributor

@wolfgangwalther wolfgangwalther left a comment

Choose a reason for hiding this comment

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

I like the idea. There is already a diff again, between master and release-24.11, for some of the workflows.

@bobby285271
Copy link
Member

bobby285271 commented Jan 20, 2025

I have the impression that this CI will remove labels that does not match the yml file (example: #375210) 🤔 For example if you add the backport label to a random PR that only touches pkgs, as soon as the labeler CI triggers will it now remove the label?

@wolfgangwalther
Copy link
Contributor

For example if you add the backport label to a random PR that only touches pkgs, as soon as the labeler CI triggers will it now remove the label?

Right, very good catch. We use sync-labels: true for that. Going through the docs, I think the only option for us is to call the labeler action twice, once with sync-labels, once without - and store the configuration for both in different files.

@pbsds
Copy link
Member Author

pbsds commented Jan 20, 2025

If an additional action on each PR is needed then i'm in favor of just not doing it and closing this PR. Barely any PRs touch the CI setup, and the current action usage is already massive since eval was moved from ofborg.

@wolfgangwalther
Copy link
Contributor

I'm not saying we need a new job - it could be a second step in the same job. So almost no overhead. But the action itself needs to run twice.

We do forget to backport those changes to CI regularly, so I think this is a really good idea here.

@wolfgangwalther
Copy link
Contributor

and the current action usage is already massive since eval was moved from ofborg.

I have plans to save some of that by moving many of the simple checks (editorconfig, nixfmt, nixpkgs-vet, ... all those) into a single job. Imho that would both improve the output and save resources. Just didn't get to it, yet.

@pbsds pbsds force-pushed the feat-auto-label-ci-backport-1737247079 branch from b2a0ec5 to 022a850 Compare January 20, 2025 11:36
@pbsds
Copy link
Member Author

pbsds commented Jan 20, 2025

pushed the change, how may i test this on my branch?

@wolfgangwalther
Copy link
Contributor

how may i test this on my branch?

Since this uses pull_request_target, it will only trigger when it's on the main branch of a repo. So you'd need to:

  • push this branch to the master branch of your fork
  • create a PR in that fork to test it works

(it might also work if you just create a PR from another branch into this branch, without the master step. The PR needs to be in your fork. But I didn't test it that way, yet)

@pbsds pbsds force-pushed the feat-auto-label-ci-backport-1737247079 branch from 022a850 to 15b3e2d Compare January 20, 2025 11:49
@pbsds
Copy link
Member Author

pbsds commented Jan 20, 2025

The ci runs on my own fork seem to get skipped for some reason...

@pbsds
Copy link
Member Author

pbsds commented Jan 20, 2025

tested working on my fork

@wolfgangwalther
Copy link
Contributor

Let's try this - we can always revert, if it causes problems.

@wolfgangwalther wolfgangwalther merged commit 1a53a38 into NixOS:master Feb 1, 2025
25 of 27 checks passed
# This file is used by .github/workflows/labels.yml
# This version uses `sync-labels: false`, meaning that a non-match will NOT remove the label

"backport: release-24.11":
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"backport: release-24.11":
"backport release-24.11":

😂

@bobby285271
Copy link
Member

bobby285271 commented Feb 1, 2025

I think this is now labeling the "backport: release-24.11" label to every PR now, I guess "!ci/OWNERS" is matching all of them now (since it is any-glob-to-any-file here).

@wolfgangwalther
Copy link
Contributor

🙈

Luckily it's the wrong label, so easy to fix that.

Will open a PR soon.

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 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants