I want to import a new version of my role into Galaxy
STEPS TO REPRODUCE
ansible-galaxy role import --token $(cat ~/.ansible-token) bodsch ansible-nginx
Successfully submitted import request 2051048527698290606629078391600408671
running
bodsch.nginx 0.9.0 has already been imported
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/api/v1/tasks.py", line 145, in legacy_role_import
raise Exception(msg)
The latest released Tag are 0.22.3
EXPECTED RESULTS
The version I specified will be imported
ACTUAL RESULTS
ansible-galaxy role import -vvvvvv --token $(cat ~/.ansible-token) --branch "0.22.3" bodsch ansible-nginx
ansible-galaxy [core 2.15.4]
config file = None
configured module search path = ['/home/bodsch/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.11/site-packages/ansible
ansible collection location = /home/bodsch/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-galaxy
python version = 3.11.5 (main, Sep 2 2023, 14:16:33) [GCC 13.2.1 20230801] (/usr/bin/python)
jinja version = 3.1.2
libyaml = True
No config file found; using defaults
Initial connection to galaxy_server: https://galaxy.ansible.com
Opened /home/bodsch/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Found API version 'v3, pulp-v3, v1' with Galaxy server default (https://galaxy.ansible.com/api/)
Calling Galaxy at https://galaxy.ansible.com/api/v1/imports/
Successfully submitted import request 2051048026056949700847675561756079610
Calling Galaxy at https://galaxy.ansible.com/api/v1/imports?id=2051048026056949700847675561756079610
running
Calling Galaxy at https://galaxy.ansible.com/api/v1/imports?id=2051048026056949700847675561756079610
bodsch.nginx 0.9.0 has already been imported
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/api/v1/tasks.py", line 145, in legacy_role_import
raise Exception(msg)
I can see the same issue. It seems like the latest version which is supposed to be imported is being resolved/sorted from the github tags “alphabetically”. Like for example “1.9.5” is higher than “1.24.3” because the third character is 9 vs. 2.
ansible-galaxy role import --api-key *** --server https://galaxy.ansible.com --branch main lablabs ansible-role-rke2
Successfully submitted import request 2051670272694773312054891301182841146
running
running
lablabs.rke2 1.9.5 has already been imported
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/api/v1/tasks.py", line 145, in legacy_role_import
raise Exception(msg)
The errors I receive on my end have changed, I now receive this:
Successfully submitted import request 2052920556269238465263671269171824387
running
namespace thulium_drake is invalid
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/api/v1/tasks.py", line 224, in legacy_role_import
result = import_legacy_role(checkout_path, namespace.name, importer_config, logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/legacy_role.py", line 51, in import_legacy_role
return _import_legacy_role(dirname, namespace, cfg, logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/legacy_role.py", line 57, in _import_legacy_role
data = LegacyRoleLoader(dirname, namespace, cfg, logger).load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/galaxy_importer/loaders/legacy_role.py", line 39, in load
self._validate_namespace()
File "/venv/lib64/python3.11/site-packages/galaxy_importer/loaders/legacy_role.py", line 61, in _validate_namespace
raise exc.ImporterError(f"namespace {self.namespace} is invalid")
Is that a different form of the same problem, or does this have a different cause?
However, this is only at the level of the galaxy github action and it is possible that this action now fails in a different way (I don’t have verbose logs of what happens inside the action).
I’ll try uploading the role manually and report back.