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

releases: Consider using new Releases API instead of Checkpoint #9

Open
kmoe opened this issue Apr 20, 2021 · 4 comments
Open

releases: Consider using new Releases API instead of Checkpoint #9

kmoe opened this issue Apr 20, 2021 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@kmoe
Copy link
Member

kmoe commented Apr 20, 2021

More research needed.

@kmoe kmoe mentioned this issue Apr 20, 2021
27 tasks
@radeksimko
Copy link
Member

New API is now live and docs are available at https://releases.hashicorp.com/docs/api/v1/

@radeksimko radeksimko added the enhancement New feature or request label May 9, 2022
@radeksimko radeksimko changed the title Consider using new releases API instead of Checkpoint releases: Consider using new Releases API instead of Checkpoint May 10, 2022
@radeksimko
Copy link
Member

I think we could try to move releases package from the static JSON to the API as the first step, without having to make any decisions about Checkpoint yet.

However I'd like to explore the possibility of the API exposing version constraint resolution endpoint, so that we don't have to keep looping over all versions to pick just one.

@jukie
Copy link

jukie commented Jul 2, 2022

Hi, has there been any more discussions on how you'd like to implement the API? I'd like to contribute towards some of that work.

@radeksimko
Copy link
Member

@jukie Not yet, but we did discuss a potential addition of a new endpoint to the API, ideally prior to the implementation. Specifically one that would allow us to resolve product version based on constraint, i.e. something similar to https://releases.hashicorp.com/docs/api/v1/#operation/getReleaseV1 where one can pass constraint such as <= 1.0 and get the latest matching version.

This would allow us to more easily/efficiently re-implement releases.LatestVersion{}, in particular the Constraints field.

Currently the querying is pretty inefficient in that we have to pull all versions and range over every single one until we find the one that matches the constraints, so having such an endpoint would then be a great motivation to migrate to that API.

@radeksimko radeksimko added this to the v1.0.0 milestone Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants