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

Galaxy v3 API: update collection_url defaults #147

Closed
felixfontein opened this issue May 7, 2023 · 12 comments · Fixed by #220
Closed

Galaxy v3 API: update collection_url defaults #147

felixfontein opened this issue May 7, 2023 · 12 comments · Fixed by #220

Comments

@felixfontein
Copy link
Collaborator

The current default is {"*": "https://galaxy.ansible.com/{namespace}/{name}"}, which will likely not work for arbitrary collections for the new Ansible Community Galaxy.

@felixfontein
Copy link
Collaborator Author

Pinging @rochacbruno @jctanner since they can probably help figuring out with what to replace it, resp. whether we can find a solution that works with both the old and the new galaxy.

@felixfontein
Copy link
Collaborator Author

For context, these links are used in the docsite, for example see the This module is part of the community.general collection (version 6.6.0). note on https://docs.ansible.com/ansible/devel/collections/community/general/aerospike_migrations_module.html#community-general-aerospike-migrations-module-check-or-wait-for-migrations-between-nodes. The note contains a link to https://galaxy.ansible.com/community/general.

@rochacbruno
Copy link

rochacbruno commented May 8, 2023

@felixfontein

On the new version of Galaxy, that URL will stop working and will redirect to the home page.

The URLs must now be specific, whether it is a collection or legacy role,

Collection

https://beta-galaxy.ansible.com/ui/repo/published/{namespace}/{name}/

and

Role

https://beta-galaxy.ansible.com/ui/legacy/roles/{namespace}/{name}/

We don't have a catch-all like URL as we had before, the current implementation performs a lookup to figure out if the path is related to a collection or a role, but we are not bringing this functionality to the new galaxy.

We may, in the future, map shorter URLs to ui/repo/published fragment, however this is not on our short team roadmap because we have higher priority performance issues to fix.

So to answer your question, for now there is no URL that will be equivalent on old and new galaxy

c/c @awcrosby

@gotmax23
Copy link
Collaborator

gotmax23 commented May 8, 2023

I consider breaking every URL unacceptable. There are many places that link to collections and roles on Galaxy. IMHO, galaxy.ansible.com shouldn't switch to the new Galaxy NG codebase until redirects or some other solution is added.

@felixfontein
Copy link
Collaborator Author

There are several options that would fix / soften several of these problems:

  1. Add redirects for existing collections and roles to the new URLs (to avoid breaking a huge amount of links already existing);
  2. Add redirects /ui/repo/published/{namespace}/{name}//{namespace}/{name}/ and /ui/legacy/roles/{namespace}/{name}//{namespace}/{name}/ to the existing Galaxy so that folks can already start the new link structure now to avoid a single large breaking change once the codebase is switched to galaxy_ng.

CC @ansible-community/community-team.

@awcrosby
Copy link

awcrosby commented May 9, 2023

Regarding those options...

  1. We can investigate adding a large number of nginx redirects in our new installation. 80% of all role downloads come from about 200 roles, so maybe we can add redirects for a number that is smaller than the total 34,000 roles.
  2. That sounds like a good idea

@felixfontein
Copy link
Collaborator Author

@awcrosby is there already an update on 2 (like: already done, planned to be done with ETA, planned to be done without ETA, still under discussion, ...) and/or 1? Or something else?

@himdel
Copy link

himdel commented Aug 24, 2023

Option 1 should be working now (ansible/ansible-hub-ui#4090) :),
it's not a straight redirect, it's a disambiguation page that tries to find any matching collections and/or roles and link to those.

TLDR: https://beta-galaxy.ansible.com/ansible/posix

@felixfontein
Copy link
Collaborator Author

That's not exactly the option 1 I described above, but it also works well :) For some existing collections it also shows a long list of legacy roles, but since collections are coming first I think that's ok. (Example: https://beta-galaxy.ansible.com/ui/dispatch/?pathname=%2Fcommunity%2Fdns)

BTW, https://beta-galaxy.ansible.com/ui/ is still advertising AnsibleFest in May 2023 :)

@rochacbruno
Copy link

BTW, beta-galaxy.ansible.com/ui is still advertising AnsibleFest in May 2023 :)

@felixfontein we are changing that image soon

@himdel
Copy link

himdel commented Aug 26, 2023

For some existing collections it also shows a long list of legacy roles, but since collections are coming first I think that's ok.

Yeah, that was a bug :) fixed in ansible/ansible-hub-ui#4144, should come to beta-galaxy soon

@felixfontein
Copy link
Collaborator Author

I created #220 to update the collection_url default.

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 a pull request may close this issue.

5 participants