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: no maintainer reviews in draft mode #372479

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wolfgangwalther
Copy link
Contributor

This is based on #371216 and #372475, only the last commit is relevant for this PR.

This avoids requesting maintainers for review by enabling DRY_MODE similar to codeowners. (#370857 (comment))

Not tested, yet.

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.

@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 9, 2025
@emilazy
Copy link
Member

emilazy commented Jan 9, 2025

FWIW I always felt like this was a misfeature of the GitHub codeowners mechanism, not something to replicate.

@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 9, 2025
@wolfgangwalther
Copy link
Contributor Author

FWIW I always felt like this was a misfeature of the GitHub codeowners mechanism, not something to replicate.

I'm fine with removing it for both maintainers and codeowners - for me, consistency matters the most here. I'd be surprised if only half of the requests are done in draft mode.

@infinisil WDYT?

@philiptaron
Copy link
Contributor

As a sometimes shy PR author, I like the GitHub draft-means-no-pings behavior, since it lets me see the CI run before "presenting" the work as ready.

@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Jan 10, 2025

As a sometimes shy PR author, I like the GitHub draft-means-no-pings behavior, since it lets me see the CI run before "presenting" the work as ready.

Interesting.

Personally, I have had more cases of "I'd like to get some feedback from others already, but make it clear that this is not merge-ready from my side, yet". This would then be "draft + reviewer requests". Edit: The missing piece here is "blocking self-review", which I would like to have done a few times.

But I guess, I could pick my initial reviewers manually as well, while you can't remove all of them once they are pinged.

@philiptaron
Copy link
Contributor

But I guess, I could pick my initial reviewers manually as well, while you can't remove all of them once they are pinged.

That's what I do, yeah.

We intend to use the edited event to react to base branch changes - but
before this change, we also ran those jobs on simple edits like title or
description.

While this works for some of the quicker jobs, it will not be
sustainable for all evaluation-related jobs. But evaluation needs to be
re-triggered on a base branch change as well, thus this change.
When the base branch changes, we need to run full eval again, because
the changed output paths depend on the base branch.
@wolfgangwalther wolfgangwalther force-pushed the ci-no-draft-maintainer-reviews branch from f93f6c8 to c765b6c Compare January 11, 2025 11:31
@wolfgangwalther
Copy link
Contributor Author

So, summarizing. There are two opinions on the matter of whether to ping or not to ping while in draft. When not pinging, those who want reviews while in draft, can always request them, but not the other way around.

Why would someone not want reviews while in draft? Because they'd like to see CI proceed. The underlying problem here is: We can't easily run CI locally to confirm that everything is green before pushing.

Thus, I propose:

  • Keep the "no pings in draft mode" for now and do it consistently for code owners and maintainers. As proposed in this PR.
  • Work towards running the CI jobs locally with a single command. If I could do a nix-build ci locally, which would result in all checks that are run in CI as well... then I might don't need draft for that anymore.

@emilazy
Copy link
Member

emilazy commented Jan 11, 2025

FWIW I think drafts are a useful signal of “still in design phase, not ready for merge yet” but that, conversely, I am often pinged on a PR that just came out of a lengthy draft stage and really wish I had known about it sooner so that I could have provided design feedback at an earlier stage. I accept that this is not fully reconcilable with shyness in putting a PR up – for my part I tend to only open PRs when I feel pretty confident about the general direction in the first place – but just explaining why I would personally prefer pings on drafts.

(But I 100% agree that we need the ability to replicate our CI locally. It would be great to avoid lock‐in too.)

@7c6f434c
Copy link
Member

One scenario where no-ping-draft-mode was used is «make pull request against master, run CI, oh no too many rebuilds, draft, retarget to staging, undraft».

@emilazy
Copy link
Member

emilazy commented Jan 11, 2025

Thankfully that’s no longer relevant since the new CI pinging stuff detects that case.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants