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

URI encode FileResource urls #433

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

amvanbaren
Copy link
Contributor

Fixes #426
Contributes to #432

Validation steps:

  • to reproduce the error, use master branch. to test the fix use this branch
  • open the branch in gitpod
  • wait until publisher terminal is done executing its task
  • use publisher terminal to execute the following commands:
    • create namespace:
    curl --location --request POST 'http://localhost:8080/api/-/namespace/create?token=super_token' \
    --header 'Content-Type: application/json' \
    --data-raw '{"name":"abelfubu"}'
    
    • download vsix package:
    curl --location --request GET 'https://open-vsx.org/api/abelfubu/abelfubu-dark/1.3.4/file/abelfubu.abelfubu-dark-1.3.4.vsix' \
    --output 'abelfubu.abelfubu-dark-1.3.4.vsix'
    
    • publish vsix package:
    curl --location --request POST 'http://localhost:8080/api/-/publish?token=super_token' \
    --header 'Content-Type: application/octet-stream' \
    --data-binary '@/workspace/openvsx/abelfubu.abelfubu-dark-1.3.4.vsix'
    
  • switch to server terminal and stop the server
  • using psql:
UPDATE file_resource SET storage_type = 'azure-blob';
  • open /workspace/openvsx/server/src/dev/resources/application-ovsx.properties and add:
ovsx.storage.azure.service-endpoint=https://openvsxorg.blob.core.windows.net/
ovsx.storage.azure.blob-container=resources
  • in server terminal run:
./gradlew runServer
  • switch back to publisher terminal and get color-theme.json:
curl --location --request GET 'http://localhost:8080/vscode/asset/abelfubu/abelfubu-dark/1.3.4/Microsoft.VisualStudio.Code.WebResources/extension/themes/abelFubu%20Dark+-color-theme.json'

@amvanbaren amvanbaren self-assigned this Mar 10, 2022
@amvanbaren amvanbaren changed the title URI encode FileResource urls #426 URI encode FileResource urls Mar 10, 2022
Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

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

@amvanbaren thanks for the very easy-to-follow validation steps! I tried all of them on both master and this PR and it looks like everything is working as expected.

LGTM! ✅

@amvanbaren amvanbaren merged commit a77dc99 into eclipse:master Mar 16, 2022
amvanbaren added a commit to EclipseFdn/open-vsx.org that referenced this pull request May 22, 2022
eclipse/openvsx#457
eclipse/openvsx#434
eclipse/openvsx#429
eclipse/openvsx#443
eclipse/openvsx#435
eclipse/openvsx#442
eclipse/openvsx#406
eclipse/openvsx#433
eclipse/openvsx#424
[feat: Add support for X-Forwarded-Prefix](eclipse/openvsx@ea2cde9)
eclipse/openvsx#419
eclipse/openvsx#421
eclipse/openvsx#422
eclipse/openvsx#410

Dependabot updates:
[Bump ajv from 6.12.2 to 6.12.6 in /webui](eclipse/openvsx@f475efa)
[Bump follow-redirects from 1.14.7 to 1.14.8 in /cli](eclipse/openvsx@4f8445c)
[Bump pathval from 1.1.0 to 1.1.1 in /webui](eclipse/openvsx@a477256)
[Bump simple-get from 3.1.0 to 3.1.1 in /cli](eclipse/openvsx@2a2d537)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URI encode FileResource urls
2 participants