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

Some versions of roles are not installable with ansible-galaxy #2910

Open
sduthil opened this issue Apr 6, 2022 · 3 comments
Open

Some versions of roles are not installable with ansible-galaxy #2910

sduthil opened this issue Apr 6, 2022 · 3 comments

Comments

@sduthil
Copy link

sduthil commented Apr 6, 2022

Bug Report

SUMMARY

For about a week now, it's been impossible to install some versions of the role cloudalchemy.prometheus from the public instance of Ansible Galaxy, especially the latest version 4.0.0.

STEPS TO REPRODUCE
ansible-galaxy install cloudalchemy.prometheus
EXPECTED RESULTS

ansible-galaxy installs the latest version 4.0.0

cloudalchemy.prometheus (4.0.0) was installed successfully
ACTUAL RESULTS

ansible-galaxy installs an older version 2.16.2

cloudalchemy.prometheus (2.16.2) was installed successfully
WORKAROUND

Use this in a requirements file:

- role: cloudalchemy.prometheus
  scm: git
  version: 4.0.0
  src: https://github.com/cloudalchemy/ansible-prometheus
NOTES
  • The issue has been raised by multiple people:
  • I have dumped the 3 pages of role versions received by ansible-galaxy in this file. We can see that the third page of versions has the correct length, but the versions are wrong and seemingly random, without order, making 2.16.2 the latest version.
  • I can reproduce the 3rd page issue with curl https://galaxy.ansible.com/api/v1/roles/22403/versions/\?page\=3\&page_size\=50 | jq '.results[].version'
@sduthil
Copy link
Author

sduthil commented Apr 7, 2022

I've encountered the same problem with the role brianshumate.consul, installing version 2.5.0 instead of the latest 2.5.4:

Steps to reproduce
ansible-galaxy install brianshumate.consul
Expected results
- downloading role from https://github.com/brianshumate/ansible-consul/archive/v2.5.4.tar.gz
Actual results
Starting galaxy role install process
- downloading role 'consul', owned by brianshumate
- downloading role from https://github.com/brianshumate/ansible-consul/archive/v2.5.0.tar.gz
Notes

@sduthil sduthil changed the title Some versions of role cloudalchemy.prometheus are not installable with ansible-galaxy Some versions of roles are not installable with ansible-galaxy Apr 14, 2022
@sduthil
Copy link
Author

sduthil commented Apr 14, 2022

This issue seems to have the same root cause: #2912

@xanmanning
Copy link

xanmanning commented Sep 20, 2022

Same issue with xanmanning.k3s - At time of writing the latest release is v3.3.0 however v2.10.6 is being pulled.

(ansible) ➜  k3s-at-home git:(main) ✗ ansible-galaxy install xanmanning.k3s
Starting galaxy role install process
- downloading role 'k3s', owned by xanmanning
- downloading role from https://github.com/PyratLabs/ansible-role-k3s/archive/v2.10.6.tar.gz
- extracting xanmanning.k3s to ./roles/xanmanning.k3s
- xanmanning.k3s (v2.10.6) was installed successfully

Run with -vvvv

(ansible) ➜  k3s-at-home git:(main) ✗ ansible-galaxy install -f -vvvv xanmanning.k3s
ansible-galaxy [core 2.13.3]
  ...
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
 ...
Initial connection to galaxy_server: https://galaxy.ansible.com
 ...
Calling Galaxy at https://galaxy.ansible.com/api/
Found API version 'v1, v2' with Galaxy server default (https://galaxy.ansible.com/api/)
Starting galaxy role install process
Processing role xanmanning.k3s 
- changing role xanmanning.k3s from v2.10.6 to unspecified
- downloading role 'k3s', owned by xanmanning
Calling Galaxy at https://galaxy.ansible.com/api/v1/roles/?owner__username=xanmanning&name=k3s
Calling Galaxy at https://galaxy.ansible.com/api/v1/roles/44229/versions/?page_size=50
Calling Galaxy at https://galaxy.ansible.com/api/v1/roles/44229/versions/?page=2&page_size=50
Calling Galaxy at https://galaxy.ansible.com/api/v1/roles/44229/versions/?page=3&page_size=50
- downloading role from https://github.com/PyratLabs/ansible-role-k3s/archive/v2.10.6.tar.gz
- extracting xanmanning.k3s to ./roles/xanmanning.k3s
- xanmanning.k3s (v2.10.6) was installed successfully

3rd page issue?

(ansible) ➜  k3s-at-home git:(main) ✗ curl -s https://galaxy.ansible.com/api/v1/roles/44229/versions/\?page\=3\&page_size\=50 | jq '.results[].version'          
"1.6.3"
"1.4.1"
"0.3.0"
"1.7.0"
"1.19.0"
"1.0.6"
"0.1.7"
"2.1.0"
"2.4.1"
"1.5.1"
"2.10.6"
"1.17.2"
"2.8.5"
"1.2.2"
"0.2.6"
"1.2.0"
"1.2.1"
"1.11.1"
"1.5.2"
"1.0.0"
"2.1.1"
"2.9.0"
"2.0.1"

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