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

More sophisticated "latest" identification in extensions/all to prefer final releases over more recent alphas #151

Open
holly-cummins opened this issue Nov 22, 2022 · 1 comment

Comments

@holly-cummins
Copy link
Contributor

We currently expose a list of all extensions at http://registry.quarkus.io/client/extensions/all/

Current behaviour:
Take the latest, sorting by extensionRelease.sortableVersion, implemented in SQL. At the moment, that would be 3.0.0.Alpha1.

Proposed new behaviour:
Prefer extensions in recommended releases. ie at the moment, return 2.14.1 extensions. This is partly about going for .Final versions rather than .Alpha versions, and partly about looking at recommendedStream.id and preferring extensions which are members of those streams.

Proposed new implementation:

This might be too hard to manage in SQL, so we would probably need to fetch all extensions and then do a manual function to inspect the .qualifiers and cross-reference against platform information.

Secondary question:

If the same version of an extension participates in two platforms, how do we choose which platform is 'latest'? Most likely, the names of the platforms would be different, so we can't just use a version comparison. If one is recommended that would help, but if both are neither are recommended, what do we do? This doesn't affect the version in extensions/all, but it does affect what metadata appears attached to the extension. See quarkusio/extensions#24 for more discussion of this.

Tertiary question:

Should we provide/encourage a mechanism for a new version of a platform extensions to be published in the registry, without a new platform release? If such a version did appear in the registry it would automatically appear in extensions/all, so no 'latest version identification' code change would be needed. In other words, if that's the problem we're actually trying to solve, we need to look at the extension release logic, not the version-sorting logic.

@gastaldi
Copy link
Collaborator

@holly-cummins for the primary question I'd suggest to take a look at how the PlatformRelease.findLatest() method is implemented: https://github.com/quarkusio/registry.quarkus.io/blob/main/src/main/java/io/quarkus/registry/app/model/PlatformRelease.java#L149

Maybe we can extract that into an utility method to make it easier to reuse

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

No branches or pull requests

2 participants