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

Can't publish new versions using manage.sh #1436

Closed
s-t-e-v-e-n-k opened this issue Mar 15, 2020 · 12 comments
Closed

Can't publish new versions using manage.sh #1436

s-t-e-v-e-n-k opened this issue Mar 15, 2020 · 12 comments

Comments

@s-t-e-v-e-n-k
Copy link
Collaborator

s-t-e-v-e-n-k commented Mar 15, 2020

Due to branch protection being enabled for master, this happens when a new release is attempted to be made:

[master afb1259a] Publish version 1.47
 2 files changed, 30 insertions(+), 1 deletion(-)
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.35 KiB | 460.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "continuous-integration/travis-ci" is expected. At least 1 approving review is required by reviewers with write access.
To github.com:PyGithub/PyGithub.git
 * [new tag]           v1.47 -> v1.47
 ! [remote rejected]   master -> master (protected branch hook declined)
error: failed to push some refs to 'git@github.com:PyGithub/PyGithub.git'

@sfdye What do you think we should do? 1.47 is up on PyPi, it looks like the tag is up on Github, we're just missing the commit with the release notes, but that means the tag will have to move as well.

@sfdye
Copy link
Member

sfdye commented Mar 15, 2020 via email

@sfdye
Copy link
Member

sfdye commented Mar 15, 2020

remote: error: Required status check "continuous-integration/travis-ci" is expected. At least 1 approving review is required by reviewers with write access.

I've disabled required travis check. Can you create a patch version 1.47.1 and try to publish it again?

image

@s-t-e-v-e-n-k
Copy link
Collaborator Author

manage.sh breaks when there are no changes between the old tag and the new tag. :-(

@sfdye
Copy link
Member

sfdye commented Mar 15, 2020

🤦‍♂ Let's fix it
what's the error?

@s-t-e-v-e-n-k
Copy link
Collaborator Author

There's 2 intertwined things -- the CI needs to pass, and 1 approving review is required. Without both of those, you can't push non-tags.

@s-t-e-v-e-n-k
Copy link
Collaborator Author

Sprinkling set -x into manage.sh:

++ grep -v Merge
++ git log v1.47.. --oneline '--pretty=format:* %s (%h)'
+ gitlog=
zsh: exit 1     REMOTE=pygithub ./manage.sh publish

@sfdye
Copy link
Member

sfdye commented Mar 15, 2020

Perhaps we should also make publishing new releases go through the PR process 🤔

@s-t-e-v-e-n-k
Copy link
Collaborator Author

I'm missing what OpenStack did, where you created a signed tag, pushed that, and the merge machinery created the tarball, release notes and the pypi release. :-)

@s-t-e-v-e-n-k
Copy link
Collaborator Author

The only thing about the PR process is we can't squash and merge since that will change the sha of the HEAD commit

@s-t-e-v-e-n-k
Copy link
Collaborator Author

Pull requests are merged using the --no-ff option, except for pull requests with squashed or rebased commits, which are merged using the fast-forward option.

Dear GitHub, why you so hard to work with :-( A ff merge is exactly what we want! perhaps a rebased commit of only one commit without HEAD changing out from under it would work, but I'm not sure if I'm wrong.

@sfdye
Copy link
Member

sfdye commented Mar 15, 2020

Okay, I've temporarily disable branch protection on master, until we can figure out a way to strike the balance between auditing every change and being able to push tags for release.

@sfdye sfdye closed this as completed Mar 15, 2020
@s-t-e-v-e-n-k
Copy link
Collaborator Author

I've pushed the Publish 1.47 commit, comment when you re-enable the branch protection just for my piece of mind.

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

No branches or pull requests

2 participants