I would like to ask you for rename the role namespace mmul to mmul-it only. If it’s not possible, just create the mmul-it namespace so I can upload roles there.
Due to Galaxy namespace naming limitations, the name of the namespace cannot have a - in it, please confirm if you’re happy with mmul_it for the namespace name?
I’m unable to import new versions of the role because my GitHub projects are under https://github.com/mmul-it/ and if I try to import, by a GitHub action or by hand I get a 500:
$ ansible-galaxy role import --token $GTOKEN --branch main mmul-it kpa_generator
ERROR! None (HTTP Code: 500, Message: Internal Server Error)
If I instead try to use the actual role namespace which is mmul I get:
$ ansible-galaxy role import --token $GTOKEN --branch main mmul kpa_generator
Successfully submitted import request 2152258394498257967616849651627835768
Starting import: task_id=2152258394498257967616849651627835768, pulp_id=019e8288-15ed-7704-9e46-27e3f875c178
==== PARAMETERS ====
importer username: rascasoft
matched user: rascasoft id:4599
github_user: mmul
github_repo: kpa_generator
github_reference: main
alternate_clone_url: None
alternate_namespace_name: None
alternate_role_name: None
==== CHECK FOR MATCHING ROLE(S) ====
user:mmul repo:kpa_generator did not match any existing roles
===== CLONING REPO =====
cloning https://github.com/mmul/kpa_generator ...
cloning failed: Cloning into '/tmp/tmp_hug85ut/kpa_generator'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Because I don’t own GitHub mmul and my sources are under mmul-it.
So creating mmul_it with the underscore would not solve the problem. In the past I always used just mmul, but then I deleted the role namespace mmul-it and everything broke. The id was 4753 and I deleted it via:
When you deleted the mmul-it legacy namespace via the API, it removed the namespace that Galaxy uses during the initial step of role imports that resolves your github_user (mmul-it) to a LegacyNamespace. That resolution happens before any of the override mechanisms from galaxy_ng#2011 (the namespace field in meta/main.yml or the alternate_namespace_name API parameter) get a chance to run. That’s why you’re seeing a 500 error. The import task fails during that initial lookup.
Unfortunately there isn’t a user-side workaround for this. The override logic that @tannerjc added can remap you to a different namespace, but it needs the initial namespace resolution to succeed first, which requires mmul-it to exist as a LegacyNamespace.
The fix is to recreate the mmul-it legacy namespace in the database and re-establish mmul as its provider. That legacy namespace predates the current hyphen restriction so it cannot be recreated through the normal means.
No problem, @rascasoft I’m aware that you’re blocked on pushing new versions but since the issue is that the mmul-it namespace no longer exists there isn’t a fix on your side. I’ll get back to you about this.