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

failed role import to new galaxy #3257

Open
bodsch opened this issue Oct 6, 2023 · 1 comment
Open

failed role import to new galaxy #3257

bodsch opened this issue Oct 6, 2023 · 1 comment

Comments

@bodsch
Copy link

bodsch commented Oct 6, 2023

Bug Report

SUMMARY

I want to import a new version of my role into Galaxy

STEPS TO REPRODUCE
ansible-galaxy role import --token $(cat ~/.ansible-token) --branch "0.22.3" 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)
@pgjavier
Copy link

We are experience the same issue, when doing ansible-galaxy import it seems to be taking the latest tag based on the string order and not the latest tag created using semver.

slingnode.ethereum 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)

Same way as when you list the tags with git.

git tag 

0.10.0
0.11.0
0.12.0
0.13.0
0.14.0
0.15.0
0.16.0
0.17.0
0.18.0
0.18.1
0.19.0
0.2.0
0.20.0
0.21.0
0.22.0
0.23.0
0.24.0
0.25.0
0.3.0
0.4.0
0.4.1
0.5.0
0.6.0
0.7.0
0.8.0
0.9.0

In our case this stopped working three weeks ago.

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

No branches or pull requests

2 participants