-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
type: bugSomething isn't workingSomething isn't working
Description
Bug description
I'm running into an issue where starting a prebuild with the "New Workspace (with this prebuild)" button is not checking out the branch. Looking at the code, this is intentional:
gitpod/components/server/ee/src/workspace/workspace-factory.ts
Lines 375 to 385 in 4c6b224
if (OpenPrebuildContext.is(context.originalContext)) { | |
// Because of incremental prebuilds, createForContext will take over the original context. | |
// To ensure we get the right commit when forcing a prebuild, we force the context here. | |
context.originalContext = buildWorkspace.context; | |
if (CommitContext.is(context.originalContext)) { | |
// We force the checkout of the revision rather than the ref/branch. | |
// Otherwise we'd the correct prebuild with the "wrong" Git status. | |
delete context.originalContext.ref; | |
} | |
} |
This makes sense, except that I'm using the prebuild for the latest commit on this branch. Would it be possible to checkout the branch in this case?
Steps to reproduce
- Push new commit to branch w/ prebuilds enabled
- Navigate to Prebuilds tab in the project
- Select latest prebuild and start a new workspace
Workspace affected
No response
Expected behavior
Opening a prebuild for the latest commit on a branch should checkout the branch.
Example repository
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done