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

Properly update response in openvsx proxy #9113

Merged
merged 1 commit into from
Apr 6, 2022
Merged

Conversation

jeanp413
Copy link
Member

@jeanp413 jeanp413 commented Apr 4, 2022

Description

Updates response when it's compressed

Related Issue(s)

Fixes #

How to test

  1. Open a workspace
  2. Run NODE_DEBUG=http,https,tls /ide/node /ide/out/server-main.js --install-extension znck.vue --do-not-sync --log trace 2> debug.log in terminal
  3. Check in debug.log file that only requests to the openvsx proxy are made and extensions are installed sucessfully
  4. Install extensions manually using UI, check extensions are installed sucessfully

Release Notes

NONE

@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch from 676c6c4 to d979e61 Compare April 4, 2022 21:05
@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch 2 times, most recently from 604554f to 1da7988 Compare April 5, 2022 05:01
@roboquat roboquat added size/L and removed size/M labels Apr 5, 2022
@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch from 1da7988 to fcd932c Compare April 5, 2022 06:20
@jeanp413 jeanp413 changed the title Properly update response in openvs xproxy Properly update response in openvsx proxy Apr 5, 2022
@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch from fcd932c to 01cc150 Compare April 5, 2022 06:26
@jeanp413 jeanp413 requested a review from akosyakov April 5, 2022 06:27
@jeanp413 jeanp413 marked this pull request as ready for review April 5, 2022 06:28
@jeanp413 jeanp413 requested a review from a team April 5, 2022 06:28
@akosyakov
Copy link
Member

@jeanp413 openvsxorg.blob.core.windows.net is reliable and it is fine to connect to it directly to fetch vsix files, only requests to open-vsx.org are problematic and should always go through OpenVSX proxy. We don't watch to cache vsix files, but only requests to open-vsx.org necessary to resolve them.

@akosyakov
Copy link
Member

@jeanp413 openvsxorg.blob.core.windows.net is reliable and it is fine to connect to it directly to fetch vsix files, only requests to open-vsx.org are problematic and should always go through OpenVSX proxy. We don't watch to cache vsix files, but only requests to open-vsx.org necessary to resolve them.

Sorry for the noise, after testing it does behave as I described. I was confused by mentioning of openvsxorg.blob.core.windows.net.

@akosyakov
Copy link
Member

@iQQBot @mustard-mh the changes seem to do the job, it would be good if you could review go code

@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch from 01cc150 to b0a52a0 Compare April 5, 2022 13:43
@roboquat roboquat added size/M and removed size/L labels Apr 5, 2022
@jeanp413 jeanp413 force-pushed the jp/openvsx-proxy-fix branch from b0a52a0 to ffce158 Compare April 5, 2022 17:19
Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go code looks good

/hold

Only in the original code there are a lot of conversions between []byte and string, some of which are not necessary, bytes have almost the same methods as strings, as well as Count, Replace, etc., but these are not included in this PR

feel free to unblock

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also works well for me.

@jeanp413
Copy link
Member Author

jeanp413 commented Apr 6, 2022

/unhold

@roboquat roboquat merged commit 5816e45 into main Apr 6, 2022
@roboquat roboquat deleted the jp/openvsx-proxy-fix branch April 6, 2022 12:25
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants