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

When a release fails, it's difficult to recover because the bot uses the same branch name #58

Open
marccampbell opened this issue Jul 20, 2021 · 4 comments
Assignees

Comments

@marccampbell
Copy link

Occasionally we have a release fail. This isn't due to any bugs in the bot code, but maybe we generated an invalid krew-index update, and this can't be merged because it fails CI.

When this happens, we get stuck, unable to use the bot and have to manually create a krew release because the bot uses deterministic branch names that can't be pushed to.

For example, after creating a broken krew-index release for an update to a project, I fixed the problem and the bot fails with:

time="2021-07-20T15:18:53Z" level=fatal msg="expected status code 200 got 500. body: opening pr: non-fast-forward update: refs/heads/schemahero-schemahero-schemahero-v0.12.3"
Post Checkout

From what I understand this is doing, if the bot were to use a new branch name, we wouldn't have this problem and the bot would recover from this error state properly.

Are there options today that we can specify to remediate, or do we need to manually create the krew-index PR after this state?

@rajatjindal
Copy link
Owner

yeah i can see why this is problematic. would you be able to submit the PR with the proposed fix? i would be more than happy to review and merge.

@rajatjindal
Copy link
Owner

Hey @marccampbell

i looked at code again. this is what we use for creating branch name:

fmt.Sprintf("%s-%s-%s-%s", request.PluginOwner, request.PluginName, request.PluginRepo, request.TagName)

lets say you had a mistake in krew template or any other issue, and to fix it you make a new commit. Won't you have to give it a new tag in that case to create a new release?

@matheusfm
Copy link

Hi @rajatjindal

We've faced this issue in Marvin.

lets say you had a mistake in krew template or any other issue, and to fix it you make a new commit.

In our case, it was simpler: the workflow step that failed is not related to the krew-release-bot.

Won't you have to give it a new tag in that case to create a new release?

We didn't create a new tag. Instead, we force-pushed the same tag then we got this error:

time="2024-07-30T18:24:01Z" level=fatal msg="expected status code 200 got 500. body: opening pr: non-fast-forward update: refs/heads/undistro-marvin-marvin-v0.2.4"

@matheusfm
Copy link

It seem similar to #64

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

3 participants