rajatjindal / krew-release-bot

bot to bump version of plugin in krew-index on new releases
Apache License 2.0
46 stars 16 forks source link

error on non-fast-forward pushes #64

Closed ahmetb closed 1 year ago

ahmetb commented 1 year ago

Hey, I'm on v0.0.43. I got error:

time="2022-11-02T23:05:22Z" level=fatal msg="expected status code 200 got 500. body: opening pr: non-fast-forward update: refs/heads/ahmetb-foreach-kubectl-foreach-v0.2.0"

because I basically had a bad commit, so I had to git reset --hard HEAD~1, make a new commit, and git push -f to my master branch.

I'm not sure where the http500 is coming from while opening a PR to krew-index, because the history rewriting happened in my own repo ahmetb/kubectl-foreach. I assume the error message is not fully accurate.

Any ideas if the repo is cached somewhere? If so where would that be, so we can clear it (or fix this) to unblock?

rajatjindal commented 1 year ago

for each PR, we push a branch to https://github.com/krew-release-bot/krew-index/branches, the naming convention is based on plugin name, user name and release version.

i think you are probably running into that.

i have deleted the branch for this release for the plugin. if you try again, it should work.

happy to debug more if this does not work out.

ahmetb commented 1 year ago

Ah, got it. I think it might be good to not maintain a cache or create random branch names etc might be better. This solved the problem, however. Thanks.