-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Properly handle the workspace list when the workspace context ref is undefined #10377
Conversation
b921da3
to
35b775c
Compare
35b775c
to
12a32bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felladrin I found that normalizedContextURL
is also an optional prop, and we use it in Gateway plugin, maybe we should make it optional in java
too?
gitpod/components/gitpod-protocol/src/protocol.ts
Lines 879 to 885 in c6910da
export interface WorkspaceContext { | |
title: string; | |
/** This contains the URL portion of the contextURL (which might contain other modifiers as well). It's optional because it's not set for older workspaces. */ | |
normalizedContextURL?: string; | |
forceCreateNewWorkspace?: boolean; | |
forceImageBuild?: boolean; | |
} |
Lines 7 to 9 in 83e3ef6
public class WorkspaceContext { | |
private String normalizedContextURL; | |
private String ref; |
We can do it in another PR
/unhold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Agreed, we need to make it optional, even if nowadays there are no more workspaces without |
Description
Properly handle the workspace list when the workspace context ref is undefined.
This fixes the issue on JetBrains Gateway preventing the workspace list from being displayed when a workspace had been created from a detached commit instead of a branch. For example, creating a workspace from https://github.com/jenkinsci/design-library-plugin/tree/73f12733d95932c333ba4155521ff78b4ed40dfc
This is the info that comes with this workspace, which does not contain the
workspace.context.ref
:Related Issue(s)
None.
How to test
Extra Info
If you want to build the extension yourself and test it locally, please open this branch IntelliJ IDEA (running in your machine, not in Gitpod) and follow these instructions.
Release Notes
Documentation