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

Ignore includeAllVersions if extensionVersion is specified. #421

Merged

Conversation

amvanbaren
Copy link
Contributor

Fixes bug introduced by #357

param.includeAllVersions was only used here:
https://github.com/amvanbaren/openvsx/blob/181346853fe636cb171321a69a1a161f286dbd27/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java#L269-L281

when param.extensionVersion is specified, then
https://github.com/amvanbaren/openvsx/blob/181346853fe636cb171321a69a1a161f286dbd27/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java#L242
is called, skipping the param.includeAllVersions logic.

#357 changed this to
https://github.com/amvanbaren/openvsx/blob/db776443c68abb08f6649ecaaa5c971d561099f8/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java#L270
while it should skip this logic if param.includeAllVersions is specified.

Testing steps:
Call /api/-/query?namespaceName={namespace}&extensionName={extension}&extensionVersion={version} where {version} isn't the latest version of the extension.
Before this change: response.extensions is empty array.
After this change: response.extensions contains extension version.

@jeanp413
Copy link
Contributor

@amvanbaren Tested this, LGTM 👍

@amvanbaren amvanbaren merged commit 22c1f39 into eclipse:master Feb 15, 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.

2 participants