-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[codehelper] replace product.json only #14821
Conversation
started the job as gitpod-build-hw-code-prod.1 because the annotations in the pull request description changed |
Tested with search, vote, marketplace. Are any other test cases to do? cc @akosyakov |
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 seems to work fine.
Will deploy after #14825 merge |
b = bytes.ReplaceAll(b, []byte("{{extensionsGalleryItemUrl}}"), []byte("https://open-vsx.org/vscode/item")) | ||
b = bytes.ReplaceAll(b, []byte("{{trustedDomain}}"), []byte("https://open-vsx.org")) |
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.
@mustard-mh I have a dumb question, why this got added 😅? I see they are added in dockerfile and then replaced here and in blobserve and they are just harcoded constant values 🤔
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 can't remember, maybe just a dumb action I did. 😅
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.
@akosyakov @iQQBot do you remember?
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.
Looks like can be removed.
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 remembered what happened, https://open-vsx.org
({{trustedDomain}}
) is too normal to replace in startup.sh
, so I need to replace it to something more special, in case it is replaced by our openvsx-proxy in startup.sh.
Looks like we still need 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.
But the final value is harcoded here and in blobserve, where is openvsx-proxy updating this variable?
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 will replace them
gitpod/components/ide/code/codehelper/main.go
Line 279 in 6469258
b = bytes.ReplaceAll(b, []byte("https://open-vsx.org"), []byte(registryUrl)) |
And installer will replace https://open-vsx.org
again
Search: "open-vsx.org", |
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.
yeah proxy url is fine, that needs to be replaced and that's why the first grep was needed.
I'm referring to {{extensionsGalleryItemUrl}}
, {{trustedDomain}}
they are replaced with constant values, the same values that are already in product.json in gp-code/main branch, it doesn't change like VSX_REGISTRY_URL
that changes for each SH installation.
So just remove them then?
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.
The constant value are https://open-vsx.org
and https://open-vsx.org/vscode/item
they all contains open-vsx.org
which will be replaced in installer
and codehelper (startup.sh)
.
But we don't want them to be changed.
- In
codehelper
, we can use sjson to Set value with json path we want - In
installer
, it's just global replacement
So we still need them because of installer
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.
Ah I get it now 💡 , but then can we make the search more specific (with a regex maybe) so it doesn't replace the other values, right now it's not obvious at all
Description
Replace
product.json
only for browser code frontend to save duration of ide readySee also internal chat
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh