-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ide] use code flag to install extensions #8313
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8313 +/- ##
===========================================
+ Coverage 12.31% 31.05% +18.73%
===========================================
Files 20 37 +17
Lines 1161 5842 +4681
===========================================
+ Hits 143 1814 +1671
- Misses 1014 3890 +2876
- Partials 4 138 +134
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@akosyakov we should keep supporting |
@jeanp413 for now we should preserve the same semantic like in in customisations to VS Code Server. For cleaning up let's file a separate issue and it will need some research and planning. |
83f51b6
to
5cd78ab
Compare
5cd78ab
to
0735f11
Compare
Updated, need re-review 😄 |
@jeanp413 @mustard-mh I found #4630 which I filed last year. I think this PR goes in right direction if it does not rely on env vars anymore. I think it is fine to remove both We should do #4630 as a follow-up after all workspaces are running this PR. It is important since it will improve startup of workspace on the server. |
@mustard-mh @jeanp413 the trouble with this PR that it will harm perceived performance, before a user could access VS Code UI before actually content was loaded or extensions are installed, now everything will be delayed. Is not there a way to start a server without extensions and then install them in parallel? It is in regards to .gitpod.yml parsing and downloading vsix files (since it requires content ready), for other cases like adding built-in extensions it is alright. Could you check whether |
We can start code first then command extentions management to install extensions |
But we should wait until code exthost ready, if cli command didn't await |
Extensions that supervisor provided, only serve once and it's reading If we use it, user start and stop worksapces to trigger extensions intall not work So we should
💡 Other ideas... cc @akosyakov |
I think .gitpod.yml already parsed and stored in db as a part of Workspace. We could fetch it from the server with |
I was thinking about this yesterday too, I'll write some questions I did myself:
|
It is a good point, Maybe we could move it somehow in server? i.e. to delay file system access internally?
I think we still should do it in regardless of
I think we should ignore it for now and delay. I don't think that it is very popular feature. Maybe we should add some analytics for server startup time and usage of vsix files in .gitpod.yml? |
You mean
Agree 👍
👍 to adding some analytics, also small thing about options I listed is we don't need to worry about race condition in |
As for now only Let's start with |
If we resolve extensions via env variable, |
log.WithError(err).WithField("wsInfo", wsInfo).WithField("cstate", contentStatus).Error("resolve workspace info failed") | ||
return | ||
} | ||
log.WithField("cost", time.Now().Local().Sub(startTime).Milliseconds()).Info("content available") |
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.
Where can I see this logs?
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.
- Open a workspace in this preview env, get URL like
https://mustardmh-test-fibq5bqd3jm.ws-dev.hw-code-flag.staging.gitpod-dev.com/
, copy prefixmustardmh-test-fibq5bqd3jm
- Make sure you setup your GCP auth, see notion
- Open a gitpod-io/gitpod workspace
- Run
kubens staging-hw-code-flag
to switch to the namespace - Run
kubectl get pods -l metaID=mustardmh-test-fibq5bqd3jm
to get correct workspace - Run
kubectl logs <workspace_pod_name> -f
to access and follow the logs
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.
Or you can go to GCP. Click correct workspace pod to access logs
Also need to add |
I can't find this flag |
Not all options appear in |
LGTM, left a minor comment in the gp-code branch gitpod-io/openvscode-server@6d0747d#r67646084 @mustard-mh does this still needs to be done? if not could you squash so we can merge it
|
WORKSPACE.yaml
Outdated
@@ -7,7 +7,7 @@ defaultArgs: | |||
jbMarketplacePublishTrigger: "false" | |||
publishToJBMarketplace: true | |||
localAppVersion: unknown | |||
codeCommit: 0175d2fd7b619fb1c34dcf2a0e17a909acd1be3e | |||
codeCommit: 6d0747dbcd685cfe47251d56a452b619c9da444b |
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.
It does not make it stable, right?
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.
This is for test only
@mustard-mh @jeanp413 Please add a new event here: https://www.notion.so/gitpod/dd900d5177944fc38d22bb8c7d3d2cce?v=54cdae8ff0f54b4d8235429ab9893e49 |
Timestamp int64 `json:"timestamp,omitempty"` | ||
} | ||
trackFn := func(ctx context.Context, gitpodService *gitpod.APIoverJSONRPC, cfg *Config, kind string) { | ||
gitpodService.TrackEvent(ctx, &gitpod.RemoteTrackMessage{ |
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.
it does not return err or something like that to log?
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.
I print this error in a new commit, but when this reproduce, no error is returned and there is no useful information in the log, see mustardmh-test-aabar7hcoyk
Does it really fix #7863 ? I think it is just a clean up we did not really identify a root cause? |
@jeanp413 found out that there is some race when installing extensions internal chat This is because our custom extension install code contains both id and URL of extension internal chat This PR is related to #7863 Our plans to fix #7863 are:
cc @akosyakov |
Yeah, I seen internal chat, ok, let's close it for now and keep eyes on it. |
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.
LGTM
/unhold |
File an issue about segment #8516 |
Description
Track readiness for
content
ide
ide-desktop
readyUpstream vscode has provided extension install with flag
--install-extension
and there are some bugs with our installation code🐛 Remove extensionIdRegex for extensions that install via file path🐛 Support extensions that their id starts with http or https
It's a Golang copy of these codes
And part of extension host timeout #7863 fixes, more detail see internal slack
Related Issue(s)
Relates #7863, fixes #7409
How to test
For test, we use this version of vscode which remove our custom extensions install only gitpod-io/openvscode-server@6d0747d
Just remove support of install with file path
Extensions
button of vscode check if all your extensions installedps -efj fww
should have a process likesegment.com
search withsupervisor_readiness
to see event trackingRelease Notes
Documentation
/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe