-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(datasource/galaxy-collection): migrate from v2 to v3 #25239
Conversation
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.
can we remove unused stuff from those json fixtures files?
Removed the biggest junks from the detailed versions already. That is the reason I have added the 1 week cache. |
If you're already migrating to galaxy v3, do you think it would be possible to enable support for custom registries aka self hosted automation hubs? |
Are you talking about allowing overwriting the registryUrl via packageRule or automatically detecting configured registries? |
If I understand #14799 correctly, the manager would already detect custom registries per dependency. But I'm not very familiar with the internals of renovate, so I've no idea how difficult it would be to actually use these sources. As for the overwrite by packageRule, that would probably be nice to have, however I'm not sure how useful that feature actually is in production unless there is a way to configure multiple urls. For example our automation hub has at least 3 different repositories (validated, rh-certified and community content), all of them have different urls and in a perfect world, renovate should be able to check them all for dependency upgrades. Or the |
Looking at the code of
If you set 3 |
Hi again, I took another look at the API of the automation hub and unfortunately simply enabling custom registry support wont do the trick because there is a small difference in the API path when using an ah compared to galaxy.com. For example if I have my ah repository at So there are 2 problems here:
The second problem would probably require renovate to somehow "parse" the registry url, extract the last part from the url and then use that information in the other API calls. |
Does this three redirect you to the proper APIs?
Tough the documentation suggest this shouldn't be used. https://galaxy.ansible.com/api/v3/swagger-ui If so I can use these instead and follow the redirects. Do you have API documentation for the AutomationHub? |
Nope, calling these endpoints returns 404. But I think that makes sense because this isn't how the automation hub works. The ah can contain multiple repositories and if my hub has e.g. 3 repositories, I have to add all 3 of them to my
I'm not sure why the galaxy API docs suggest not to use them. Until now I thought galaxy (v3) would simply be an automation hub with a single repository "published" but as it seems Redhat added some tweaks to the API.
According to https://access.redhat.com/solutions/6963967 Redhat doesn't provide public API docs. However after a quick search, I could find https://developers.redhat.com/api-catalog/api/automation-hub which seems to be the automation hubs API with the small difference that the automation hub's API actually starts with |
With the last finding I'm sure this is out of scope for this change right now. Please create a discussion and summarise the findings there. |
# Conflicts: # lib/modules/datasource/galaxy-collection/index.ts
🎉 This PR is included in version 37.56.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
Use the v3 API instead of v2
Context
Closes #24981
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
https://github.com/secustor/renovate_ansible_galaxy_test