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

What's the current release procedure? #160

Open
agroszer opened this issue Sep 30, 2022 · 7 comments
Open

What's the current release procedure? #160

agroszer opened this issue Sep 30, 2022 · 7 comments

Comments

@agroszer
Copy link
Contributor

Probably missed the message, what's the current release procedure?
Tried to release z3c.rml, tried the good 'ol fullrelease of zest.releaser but can't push the changes to master because

remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: 4 of 4 required status checks are expected.
To github.com:zopefoundation/z3c.rml.git
 ! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'github.com:zopefoundation/z3c.rml.git'

4.2.1 went out to pypi, then I went through a PR to get the changes to master.

@dataflake
Copy link
Member

I don't use zest.releaser so I can't comment on that. In general, there's no universal procedure because master branch protection rules are not the same across all repositories. In this case the CI tests didn't run through. Some repositories also have references to the old Travis CI tests in these branch protection rules, in those cases the condition will never be met until the rule is changed.

@ale-rt
Copy link
Member

ale-rt commented Sep 30, 2022

Given the master branch is protected I guess the best thing you can do is to use a release branch and make a PR.

That means you will have to run something like:

git checkout -b release
git push

and then make a pretty silly PR.

Also I think you have to run

git push --tags

to make the 4.2.1 tag appear on GitHub.

Maybe @icemac has more to say here.

@mgedmin
Copy link
Member

mgedmin commented Oct 2, 2022

We have disabled branch protection rules in the past to allow the zest.releaser workflow. (I don't remember which repo it was, specifically.) It would be my personal preference to continue doing so (although I'm not very active in the Zope world nowadays, so I don't know if my opinion counts for much).

dataflake added a commit to zopefoundation/z3c.rml that referenced this issue Oct 3, 2022
@dataflake
Copy link
Member

I'm still unclear why pushing to master didn't work, or maybe I do not understand what zest.releaser does in the background. A manual change and push to master works as I would expect. The push is accepted and the GitHub Actions tests are triggered.

@agroszer
Copy link
Contributor Author

agroszer commented Oct 4, 2022

Looks like it's me, I can't push to master for some reason, neither with a signed commit:

remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: 4 of 4 required status checks are expected.
To github.com:zopefoundation/z3c.rml.git
 ! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'github.com:zopefoundation/z3c.rml.git'

@mgedmin
Copy link
Member

mgedmin commented Oct 4, 2022

By default people with administrative privileges can ignore branch protection rules and push directly. That's why it works for some people and doesn't work for others.

I've disabled the branch protection for z3c.rml, since we're all consenting adults etc etc. and I didn't see anyone arguing strongly for retaining them in this conversation.

@icemac
Copy link
Member

icemac commented Oct 5, 2022

Sorry for being late to the party. 🥳

I think it was mainly me manually activating branch protection for zopefoundation repositories – especially as GitHub nowadays informs me when it is not the case.
Usually I activate

  • Require status checks to pass before merging (mostly for lint, docs, coverage, minimum supported Python version, usual Python version (3.10 nowadays) and long running Python version (PyPy3))
  • Require conversation resolution before merging

I my mind this allows for clean PRs and gives the ability to use the auto merge feature once the status checks are green and for some repositories the required approvals are gathered.

I see that this is not a good solution for making releases by non-admins. (I see no story at all for this using a protected master branch. Maybe @mauritsvanrees has some experiences or ideas for using zest.releaser in this scenario.)

For z3c.rml I allowed all 197 users in the developers group to write to master. Maybe we have to do this for all repos, so not only the admins have an easy life creating releases. On the other hand: this would make using pull requests optional – I think I could live with this result as we are all adults and have learned to ask for a second opinion or at least for status checks using a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

5 participants