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

πŸ§ͺ Introduce a unified gate/check GHA job #1204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webknjaz
Copy link
Contributor

This adds a GHA job that reliably determines if all the required dependencies have succeeded or not.

It also allows to reduce the list of required branch protection CI statuses to just one β€” check. This reduces the maintenance burden by a lot and have been battle-tested across a small bunch of projects in its action form and in-house implementations of other people.

I was curious about the spread of use. And I've just discovered that it is now in use in aiohttp (and other aio-libs projects), CherryPy, some of the Ansible repositories, all of the jaraco's projects (like setuptools, importlib_metadata), some PyCQA and pytest projects, a few AWS Labs projects (to my surprise), CPython and many others. Admitedly, I maintain some of these but it does address some of the real pain folks have:
jaraco/skeleton#55 (comment).

The story behind this is explained in more detail at https://github.com/marketplace/actions/alls-green#why.

@webknjaz
Copy link
Contributor Author

@dairiki so eventually, with this in, it should be possible for somebody with the right amount of access to set up a branch protection ruleset, making All tests passed a required check. This in turn will make it possible for the project to enable fun features like auto-merge or merge queues. I think it would be useful to file a number of issues post-merge describing tasks to be performed by the people with better accesses, separately.

@dairiki
Copy link
Contributor

dairiki commented Nov 14, 2024

@dairiki so eventually, with this in, it should be possible for somebody with the right amount of access to set up a branch protection ruleset, making All tests passed a required check. This in turn will make it possible for the project to enable fun features like auto-merge or merge queues. I think it would be useful to file a number of issues post-merge describing tasks to be performed by the people with better accesses, separately.

I don't have much familiarity with auto-merge or merge queues. They do sound potentially useful.
At the same time, this is not a large project (in terms of the number of active contributors and maintainers) we seem to be getting along okay without them.

For the past two years, the bulk of the work β€” both in terms of maintenance and new features β€” on Lektor has been done by two people: @yagebu, who among other things has done a great job keeping the JS frontend healthy, and myself.
I don't have sufficient permissions to access the GitHub project settings. (I'm not sure about @yagebu.) This makes me hesitant to play with any features that require access to the project settings.
We've been blocked before by issues requiring updates to GitHub (and PyPI) settings. These have required emails and significant turnaround time to resolve.

Anyhow, I'm hesitant to move forward with this. If a maintainer who does have access to project settings is interested in shepherding this, that would be a different case.

@webknjaz
Copy link
Contributor Author

@dairiki it is safe to merge as is. It is still a nice restructuring. W/o the repo settings updates, the workflow remains the same. However, adding jobs that depend on "everything important is green" is easier this way. All those other things I mentioned are possible improvements of the configuration on top, nothing more.

@webknjaz
Copy link
Contributor Author

@dairiki perhaps, #1207 would be less controversial?

@dairiki
Copy link
Contributor

dairiki commented Nov 15, 2024

However, adding jobs that depend on "everything important is green" is easier this way.

But we only have one job that depends on "all green". If I understand correctly, this doesn't buy us much until we add more of those.
And it has the downside of introducing one more third-party action into our workflow (which comes with security implications β€” however slim they are, in this case).

@dairiki perhaps, #1207 would be less controversial?

Yes, I'm fine with the renaming.

@webknjaz
Copy link
Contributor Author

That's fair. Perhaps its current value is encoding what's considered required in PRs (on the summary workflow run page, in the job graph), as code.

@webknjaz
Copy link
Contributor Author

@dairiki on the point of more jobs, I could bring-in something provenance-related from my other workflows (like SLSA, GH-native attestations and regular Sigstore) if that's desired. Until somebody with access configures Trusted Publishing, the PyPI ones won't be available.

This adds a GHA job that reliably determines if all the required
dependencies have succeeded or not.

It also allows to reduce the list of required branch protection CI
statuses to just one β€” `check`. This reduces the maintenance burden
by a lot and have been battle-tested across a small bunch of projects
in its action form and in-house implementations of other people.

I was curious about the spread of use. And I've just discovered that
it is now in use in aiohttp (and other aio-libs projects), CherryPy,
some of the Ansible repositories, all of the jaraco's projects (like
`setuptools`, `importlib_metadata`), some PyCQA and pytest projects,
a few AWS Labs projects (to my surprise), CPython and many others.
Admitedly, I maintain some of these but it does address some of the
real pain folks have:
jaraco/skeleton#55 (comment).

The story behind this is explained in more detail at
https://github.com/marketplace/actions/alls-green#why.
@webknjaz webknjaz force-pushed the maintenance/gha-alls-green branch from f0e2c07 to 9265ac5 Compare November 18, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants