[vsx-registry] Use new 'query' API endpoint #8570
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
VSX_REGISTRY_URL
to the URL obtained by typinggp url 8080
in the openvsx workspace.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