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

[BitbucketServer] Prebuilds are broken on branch context #13486

Closed
AlexTugarev opened this issue Sep 30, 2022 · 6 comments · Fixed by #13745
Closed

[BitbucketServer] Prebuilds are broken on branch context #13486

AlexTugarev opened this issue Sep 30, 2022 · 6 comments · Fixed by #13745

Comments

@AlexTugarev
Copy link
Member

Bug description

We see a blocker for prebuilds on branches of BBS repositories.

Given a context URL like https://bbs.server.com/projects/proj1/repos/repo1/browse?at=refs%2Fheads%2Ffoo, the context parser computes refs/heads/foo as value for ref, which is fully qualified and might be necessary for API calls, but it's apparently wrong for git operations.

Git initializer fails with:

cannot initialize workspace: cannot initialize workspace: git initializer clone: git checkout -B refs/heads/main origin/refs/heads/foo failed (exit status 128): fatal: 'origin/refs/heads/foo' is not a commit and a branch 'refs/heads/foo' cannot be created from it

Using the branch name from refs/heads/<branchName> should work, though remains to be verified.

Also, for the context, if subsequent API calls would also work with ?at=foo, it could be simplified in the context parser, otherwise we need to check the params for prebuild manger which is called by the BBS application.

Steps to reproduce

  1. (BBS) Create a repo and a new branch from default branch.
  2. (Gitpod) Create a project for that repo. And make sure the repo is gitpodified, e.g. there is a .gitpod.yml included.
  3. Try to run a prebuild from the branch.

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

@AlexTugarev AlexTugarev added type: bug Something isn't working feature: prebuilds labels Sep 30, 2022
@jldec jldec moved this to Scheduled in 🍎 WebApp Team Sep 30, 2022
@jmls
Copy link

jmls commented Oct 10, 2022

this is a real problem with us for one of our customers .. please can we have some feedback on this

@jldec
Copy link
Contributor

jldec commented Oct 11, 2022

@jmls we're looking at this - can you confirm that this is only an issue with Bitbucker Server (not bitbucket.org cloud).

@AlexTugarev AlexTugarev self-assigned this Oct 11, 2022
Repository owner moved this from Scheduled to In Validation in 🍎 WebApp Team Oct 11, 2022
@jmls
Copy link

jmls commented Oct 11, 2022

@AlexTugarev awesome ! thanks - any expectation of eta so I can inform the customer ?

@AlexTugarev
Copy link
Member Author

@jmls, I'll try to verify that workspaces do start as expected for branch contexts once the running deployment is done, then post an update here.

@AlexTugarev
Copy link
Member Author

@jmls, it looks good now. I could start workspaces for branch URLs.

@AlexTugarev AlexTugarev moved this from In Validation to Done in 🍎 WebApp Team Oct 11, 2022
@jmls
Copy link

jmls commented Oct 11, 2022

thanks, will let the customer know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants