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

[vsx-registry] Use new 'query' API endpoint #8570

Merged
merged 1 commit into from
Oct 1, 2020
Merged

Conversation

spoenemann
Copy link
Contributor

What it does

The root issue is eclipse/openvsx#163: Some API endpoints of Open VSX were written such that they return HTTP status 200 even when the resource identified by the URL does not exist, which is inconsistent with HTTP standards. The motivation for this was that fetching data with a non-OK response from the browser always leads to an error being logged in the console (see https://bugs.chromium.org/p/chromium/issues/detail?id=124534). This is being improved in eclipse/openvsx#183 by introducing a new POST endpoint that should be used by Theia and other IDEs. The originally used endpoints will retain the current behavior for a few weeks, but then they'll be changed to return status 404 when the resource does not exist.

This PR changes VSXRegistryAPI to use the new API endpoint of Open VSX. The PR should not be merged until the upstream change has been deployed, but it is already possible to test this.

How to test

  • Start a Gitpod workspace at eclipse/openvsx#183
  • Set the Theia environment variable VSX_REGISTRY_URL to the URL obtained by typing gp url 8080 in the openvsx workspace.
  • Start Theia, open the Network tab in the developer tools and observe the requests to the query endpoint. Most of them return an empty array because the test instance of openvsx has very few published extensions, but some return the requested extension metadata.

Review checklist

Reminder for reviewers

@vince-fugnitto vince-fugnitto added the vsx-registry Issues related to Open VSX Registry Integration label Sep 29, 2020
Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

Could not test because of a Gitpod error, but LGTM code-wise.

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

Can't start OpenVSX registry
image

@svenefftinge
Copy link
Contributor

@spoenemann the Gitpod link points to a merged PR where the branch is deleted. So it is not openable.
But change looks good.

@svenefftinge svenefftinge merged commit ff9b62f into master Oct 1, 2020
@svenefftinge svenefftinge deleted the vsx-registry-api branch October 1, 2020 05:42
@paul-marechal
Copy link
Member

@svenefftinge is this a Gitpod limitation? Sounds like it would help being able to open merged changes, just like we tried here.

@spoenemann
Copy link
Contributor Author

I forgot to mention that after deleting the PR branch you can still test the new API using the master branch of Open VSX:

https://gitpod.io/#https://github.com/eclipse/openvsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants