-
Notifications
You must be signed in to change notification settings - Fork 35
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
Support Initializr Metadata v2.2 #138
Comments
It's good know that Spring also switches to SemVer! I just compared the responses, finding v2.1"versionRange": "[2.2.0.RELEASE,2.4.0.M1)" v2.2"versionRange": "[2.2.0.RELEASE,2.4.0-M1)" Just to confirm that, before we support v2.2, VersionHelper is not broken because of the on-the-fly translation. So nothing will be broken, as the Agreed with the proposal you mentioned above, and I'll enhance VersionHelper to support both formats. (BTW I just feel it would take a long time to completely retire the old version format.) |
You're not broken at the moment as And yes, both formats must be supported to be compliant with |
@snicoll
Do you have any idea about it? |
@Eskibear thanks for the feedback. This is an oversight on our end, partially due to the fact this endpoint is deprecated and will be removed in v3 (see spring-io/initializr#958). I've created spring-io/initializr#1115 to let you get access to the content with v2.2 and I understand using this endpoint is some existing code you've received but this feature will be removed in a near future so please remove all use of this endpoint as soon as possible. Also, if you use the
|
Thank you for the information. The As for the vscode-spring-initializr/src/model/ServiceManager.ts Lines 9 to 13 in 2afe19f
|
@Eskibear so you're not blocked then are you? I am a bit confused as the example above is using a different accept header. And great to hear you're moving away from that undocumented dependencies endpoint. |
@Eskibear start.spring.io has been updated to handle 2.2 only for consistency, although you shouldn't be using that but rather the |
Let me be clear, basically we have two actions:
This explains the behavior, and now it's unblocked. Thanks for the quick update. |
supported in v0.5.0 |
The Spring team has recently decided to switch their version scheme to SemVer format. This had an unexpected result for remote clients of start.spring.io as the format of the Spring Boot versions (
bootVersion
attribute) and thecompatibilityRange
in some dependencies can have an unexpected format.We figured it out and translated those formats to the original format on the fly. This fixes the problem but is not ideal as remote clients can have a version pattern that actually does not exist. We've introduced a new metadata version,
v2.2
that does not do that translation. Going forward, the original format and the new SemVer format can coexist. Ultimately, only the SemVer will remain once the Spring Boot releases using the original format go EOL.In order to consume that format, the client needs to understand semVer, in particular for version ranges. I don't know if this plugin is impacted by if it is, VersionHelper should be impacted.
For some time, both
v2.1
andv2.2
should be supported. start.spring.io supports both obviously but the user may point to a custom instance that hasn't been upgraded yet. You could use content negotiation to mark a preference for 2.2 and consume 2.1 if it's not available, something like(the default factor is
1.0
). I believe this should be done in ServiceManager. The actual version can be checked in theContent-Type
attribute of the reply although it shouldn't matter to you once you understand both version formats.Let me know if something isn't clear. Thanks a lot for your hard work on this plugin!
The text was updated successfully, but these errors were encountered: