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

Add a Published version API #5995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Nov 14, 2024

This is a very simple API, just allowing other repositories to get the latest version of a provider. The API is listed as v0, marking it as experimental and without backwards comparability guarantees. I don't expect this API to survive the IA transition the registry will undergo.

Copy link

Your site preview for commit 5fbdd87 is ready! 🎉

http://registry--origin-pr-5995-5fbdd870.s3-website.us-west-2.amazonaws.com/registry.

Copy link

Your site preview for commit 62af648 is ready! 🎉

http://registry--origin-pr-5995-62af6487.s3-website.us-west-2.amazonaws.com/registry.

Copy link
Contributor

@guineveresaenger guineveresaenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I entirely understand the use case.

Is there a reason we wouldn't be able to query the version found in themes/default/data/registry/packages/<provider>.yaml ?

@iwahbe
Copy link
Member Author

iwahbe commented Nov 15, 2024

I'm not sure I entirely understand the use case.

The use case is a into-registry pipeline being able to check what version a provider is currently at, to determine if an update should be sent to the registry.

Is there a reason we wouldn't be able to query the version found in themes/default/data/registry/packages/<provider>.yaml ?

AFAIK Hugo doesn't present the data folder in the generated site.

Copy link

Your site preview for commit 0b6e74a is ready! 🎉

http://registry--origin-pr-5995-0b6e74a8.s3-website.us-west-2.amazonaws.com/registry.

@guineveresaenger
Copy link
Contributor

Sure, but why would we need to query an endpoint on the generated site? Couldn't we query this repo? I suppose I'm not sure how sophisticated this pipeline needs to be, but it's been my impression that these files are absolutely meant to be used for version update reconciliation.

@iwahbe
Copy link
Member Author

iwahbe commented Nov 15, 2024

Sure, but why would we need to query an endpoint on the generated site? Couldn't we query this repo? I suppose I'm not sure how sophisticated this pipeline needs to be, but it's been my impression that these files are absolutely meant to be used for version update reconciliation.

I'm trying to move to a model where the registry presents an API distinct from it's implementation details. If we want to move our metadata files from themes/default/data/registry/packages/ to data/registry/packages/ (where they should be) or change the way they are represented, I don't want that to break other systems. Likewise, if the registry decides to remove the experimental API, then I want to be able to do so without changing the layout of the repo.

@iwahbe
Copy link
Member Author

iwahbe commented Nov 15, 2024

I revisited this, moving the entire API into Hugo instead of resourcedocsgen.

@iwahbe iwahbe self-assigned this Nov 15, 2024
Copy link

Your site preview for commit 443ace0 is ready! 🎉

http://registry--origin-pr-5995-443ace02.s3-website.us-west-2.amazonaws.com/registry.

@iwahbe
Copy link
Member Author

iwahbe commented Nov 15, 2024

Your site preview for commit 443ace0 is ready! 🎉

http://registry--origin-pr-5995-443ace02.s3-website.us-west-2.amazonaws.com/registry.

To "use" the API, you would run

$ curl http://registry--origin-pr-5995-443ace02.s3-website.us-west-2.amazonaws.com/registry/api/v0/packages/azure/version
{"version":"v6.9.0"}

Copy link

Your site preview for commit 305e770 is ready! 🎉

http://registry--origin-pr-5995-305e7708.s3-website.us-west-2.amazonaws.com/registry.

Copy link
Contributor

@guineveresaenger guineveresaenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline and LGTM.

Thank you for the smaller change as well.

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

Successfully merging this pull request may close these issues.

2 participants