Skip to content

Fix: ensure that /vscode/gallery/<namespace>/<extension>/latest only returns the latest versions#1791

Merged
netomi merged 7 commits intomainfrom
fix-latest-endpoint
Apr 28, 2026
Merged

Fix: ensure that /vscode/gallery/<namespace>/<extension>/latest only returns the latest versions#1791
netomi merged 7 commits intomainfrom
fix-latest-endpoint

Conversation

@netomi
Copy link
Copy Markdown
Contributor

@netomi netomi commented Apr 24, 2026

This fixes #1779.

This PR includes the following changes:

  • setup list of valid registries upon initialization instead of doing it per-request
  • add a new findLatestVersionByTargetPlatform method that returns the latest version per target platform
  • update the /vscode/gallery/{namespace}/{extension}/latest endpoint to return the latest version per platform only, this includes both preRelease and regular versions

Furthermore, the result from the latest endpoint is cached and invalidated if anything changes for the extension in question. The VersionService.getLatestByTargetPlatform is also cached in preparation of changes to extensionquery.

Comment thread server/src/main/java/org/eclipse/openvsx/adapter/UpstreamVSCodeService.java Dismissed
@netomi netomi requested review from autumnfound and gnugomez April 27, 2026 12:50
@netomi netomi marked this pull request as ready for review April 27, 2026 12:59
@netomi
Copy link
Copy Markdown
Contributor Author

netomi commented Apr 27, 2026

The DB query to retrieve the latest version grouped by target platform has been sketched with the help of Claude Code

@netomi netomi added the snapshot Pull requests with that label will automatically build and publish snapshot images label Apr 27, 2026
@netomi netomi force-pushed the fix-latest-endpoint branch from ac47aa4 to 71c20b8 Compare April 27, 2026 14:03
@netomi netomi changed the title Fix: ensure that /vscode/gallery/<namespace>/<extension>/latest only return the latest versions Fix: ensure that /vscode/gallery/<namespace>/<extension>/latest only returns the latest versions Apr 28, 2026
@netomi
Copy link
Copy Markdown
Contributor Author

netomi commented Apr 28, 2026

tested it locally with a copy of the production db to check performance and correctness of the results. All looks good from my side.

@netomi netomi merged commit 94fbdeb into main Apr 28, 2026
8 checks passed
@netomi netomi deleted the fix-latest-endpoint branch April 28, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Pull requests with that label will automatically build and publish snapshot images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Endpoint /vscode/gallery/<namespace>/<extension>/latest includes all versions

2 participants