-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make sure the registry ordering reflects the priority for the platform selection algorithm #18800
Make sure the registry ordering reflects the priority for the platform selection algorithm #18800
Conversation
…m selection algorythm and the platform stream/version containing most of the requested extensions is preferred.
final OriginPreference originPreference = new OriginPreference(1, 1, 1, ++memberIndex, 1); | ||
Map<String, Object> metadata = memberCatalog.getMetadata(); | ||
if (metadata.isEmpty()) { | ||
metadata = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why create a new instance if the metadata is empty already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/quarkusio/quarkus/blob/main/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/catalog/json/JsonExtensionCatalog.java#L88
I should probably initialize it to new HashMap<>(0)
in the JsonExtensionCatalog and remove this ugliness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just added a minor observation
Failing Jobs - Building 6064e9a
Full information is available in the Build summary check run. Test Failures⚙️ MicroProfile TCKs Tests #📦 tcks/microprofile-fault-tolerance✖
|
This PR fixes a couple of issues when selecting platforms for project creation. Specifically, it makes sure the platform stream/version containing most of the requested extensions is preferred even if it's not the latest available stream/version.
Also fixes addition of extensions to the already existing platforms by allowing to query the registries for extensions from platforms that aren't imported by the project.