Skip to content

fatal: 'origin/branch-name' is not a commit and a branch 'branch-name' cannot be created from it #11854

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

Closed
kylos101 opened this issue Aug 3, 2022 · 14 comments · Fixed by #11895 or #12044
Assignees
Labels
component: ws-daemon type: bug Something isn't working

Comments

@kylos101
Copy link
Contributor

kylos101 commented Aug 3, 2022

Bug description

In gen59, we see errors like:
image

We must be hitting this error, which gets traced here.

Steps to reproduce

Not sure.

Maybe try starting a workspace, and delete the remote branch before the workspace starts, ideally after context parsing, before loading the content.

Workspace affected

n/a

Expected behavior

  1. We should log this as an error, not debug, so we can see in the logs w/o enabling debug
  2. We should return a clear message to the user when this happens.
  3. We shouldn't retry so many times for so long

image

Example repository

No response

Anything else?

No response

@kylos101 kylos101 added the type: bug Something isn't working label Aug 3, 2022
@kylos101 kylos101 moved this to Scheduled in 🌌 Workspace Team Aug 3, 2022
@jenting
Copy link
Contributor

jenting commented Aug 4, 2022

I check the spans and corresponding logs, a case happens in prebuild, and the remote branch does not exist anymore.

@sagor999 sagor999 self-assigned this Aug 4, 2022
@sagor999 sagor999 moved this from Scheduled to In Progress in 🌌 Workspace Team Aug 4, 2022
Repository owner moved this from In Progress to Awaiting Deployment in 🌌 Workspace Team Aug 5, 2022
@kylos101 kylos101 reopened this Aug 10, 2022
@kylos101 kylos101 moved this from Awaiting Deployment to Scheduled in 🌌 Workspace Team Aug 10, 2022
@kylos101
Copy link
Contributor Author

kylos101 commented Aug 10, 2022

Still seeing this issue with prebuilds [1][2] in us60

@kylos101
Copy link
Contributor Author

@atduarte adding back to scheduled

@jenting
Copy link
Contributor

jenting commented Aug 10, 2022

Still seeing this issue with prebuilds [1][2] in us60

The way to reproduce it is when running prebuild, the remote branch is deleted at that moment.

@kylos101
Copy link
Contributor Author

When this happens:
Image

A chain of events occur:
Image

Image

@jenting
Copy link
Contributor

jenting commented Aug 10, 2022

I checked the InitWorkspace span, and I found an interesting thing, all the checkout branch error comes with the users using the additionalRepositories configuration within the .gitpod.yml.

Also, I create a test repo, and I can reproduce it. Just open the repo with the branch test-branch-1, and filter the Jaeger tracing with

  • service=content-initializer
  • error=true

The problem is that all the additional repositories do not have branch test-branch-1. However, the content-initializer still trying to pull the test-branch-1. If the branch test-branch-1 does not exist, we fall back to pull the default branch.

Note: the user's behavior is correct.

Repository owner moved this from In Progress to Awaiting Deployment in 🌌 Workspace Team Aug 10, 2022
@fitztrev
Copy link

This has started happening for me today.

Repo: https://github.com/rosen-score/lila-gitpod

@kylos101
Copy link
Contributor Author

:wave @fitztrev , thanks for the heads up! This fix will ship next week.

@fitztrev
Copy link

@kylos101 thanks for the quick update!

Seems to have started happening today because this change deployed yesterday: #11895 And now it does a hard stop if it encounters a git checkout error.

Yes, it probably was due to the fact that the default branch name is different between the main repo and any of the additionalRepositories.

For now, until this gets deployed, I removed the additionalRepositories section and just git clone them individually in the startup script.

@jimmybrancaccio
Copy link

jimmybrancaccio commented Aug 12, 2022

@david-bakin
Copy link

david-bakin commented Aug 14, 2022

Is it gitpod's flow to close bugs before deployment (and before confirmation)? I got this today - see #12118. I didn't find this bug because my default filter is on "is:open".

@sagor999 sagor999 moved this from Awaiting Deployment to In Validation in 🌌 Workspace Team Aug 15, 2022
@atduarte
Copy link
Contributor

@david-bakin Github issues are closed automatically and moved to "Awaiting Deployment" whenever the code that fixes the issue is merged.

image

Then when we deploy, it is moved to "In Validation".

@mikenikles
Copy link
Contributor

Hey @atduarte, based on your comment this issue has been deployed, can you confirm?

According to Kyle on Discord, issues are only deployed once they have the deployed: workspace label, which isn't the case for this issue here.

@atduarte
Copy link
Contributor

@mikenikles yap! As part of gen61.

The deployed: workspace label is applied to the PRs, not the issues unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ws-daemon type: bug Something isn't working
Projects
No open projects
Status: Done
8 participants