Make a pass-job - #18686
Make a pass-job#18686nstarman wants to merge 3 commits into
Conversation
Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
neutrinoceros
left a comment
There was a problem hiding this comment.
I like the idea, so approving. However we'll need someone with owner privileges to sign off, so I'm not merging yet.
| if: always() | ||
| steps: | ||
| - name: All required jobs passed | ||
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 |
There was a problem hiding this comment.
Yet another custom workflow. What if it breaks in the future? I need to ponder the pros and cons.
There was a problem hiding this comment.
So a really simple example of this in action (pun?) is scientific-python/cookie#647 .
Theoretically, this gives anyone with write access (not just repo admin) to change the rules. I cannot decide if this is pro or con. Right now we only update rules when we bump Python (because Python version is tied into job name). But if anyone can push such rule change at any time during dev cycle, it is going to introduce inconsistency to the process.
Con: At a glance, if it fails, you cannot know which failed job is actually required without diving into the log.
There was a problem hiding this comment.
Theoretically, this gives anyone with write access (not just repo admin) to change the rules. I cannot decide if this is pro or con.
I think that's a pro: sure, this means anyone can "cheat" the system, but, critically, they cannot do so stealthily. Any rule change would be met with skepticism from reviewers, except, perhaps, in the rather exceptional case that it's done with valid reasons.
There was a problem hiding this comment.
Add @pllim as a code-owner and others to be code owners of the CI file? https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
Guarantees eyes on changes to the CI.
There was a problem hiding this comment.
No need. I watch the repo. Also, PR only needs one approval from anyone to merge. Only take one careless dev.
There was a problem hiding this comment.
Yes, but how is our current system better at shielding us against mistakes ?
There was a problem hiding this comment.
The current system limit the mistake to repo admin. This new workflow opens up mistake points to all possible people who able to merge a PR.
There was a problem hiding this comment.
I would feel more comfortable if we can test it out first in one of the affiliated packages or something.
There was a problem hiding this comment.
Coordinated or affiliated? Or I've put this in https://github.com/GalacticDynamics/unxt
There was a problem hiding this comment.
It works great in unxt. The one drawback I've noticed is that you can't see which jobs are required to pass. It is easily inferable since fail-fast is on, so if a test is failing and the CI hasn't stopped, then it's not required to pass :p. But still worth mentioning as it's the one small annoyance that I've found.
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary. If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
@pllim we can achieve the current level of protection using a GH action
Then we can have a pass-job (as recommended by scientific-python) and ensure that only those with the right permissions can merge modifications to CI.
|
|
@nstarman I think your proof-of-concept should be deployed to a smaller repo first to prove that it works as intended before we roll it out here. It is a lot of hassle to set this up, and then undo it if it does not really work as expected. Thanks. |
|
I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks! If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here. |
Following https://learn.scientific-python.org/development/guides/gha-basic/#pass-job
@pllim I think this means we can change most of the CI pass requirements to just this job.