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.yml seems to always contain the previous release version number #10664

Closed
etu opened this issue Nov 29, 2023 · 4 comments · Fixed by #10727
Closed

galaxy.yml seems to always contain the previous release version number #10664

etu opened this issue Nov 29, 2023 · 4 comments · Fixed by #10727
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@etu
Copy link

etu commented Nov 29, 2023

Hello,

I'm currently looking into migrating my usage of kubespray from pinning it as a submodule in git to keep track of the version to using it from ansible-galaxy and pinning it that way.

So the first thing I noticed is that there's something else named kubespray on ansible galaxy under some different namespace that doesn't at all follow the versioning scheme of this kubespray (link here) I never cared to figure out what it was but it got me to install kubespray from git instead using ansible-galaxy.

So I have the following requirements.yml:

---
collections:
  - name: https://github.com/kubernetes-sigs/kubespray.git
    type: git
    version: v2.22.1

Then I run:

ansible-galaxy collection install -r requirements.yml

At the end of the output I get: kubernetes_sigs.kubespray:2.21.0 was installed successfully

So that wasn't the version I asked for, so I started digging. It seems to me like I did get 2.22.1 just that it printed a different version. So I started digging around a bit and found this file in the 2.22.1 release tree: https://github.com/kubernetes-sigs/kubespray/blob/v2.22.1/galaxy.yml where it says 2.21.0 which is probably what ansible-galaxy reads out.

I also tried to update it to 2.23.1, then it instead printed 2.22.1.

This is very confusing as I want to ensure that the version I expect to be pinned and installed is the one in my requirements file by running a few checks steps before I invoke the kubespray playbooks from ansible galaxy.

This "lagging" version can also be observed from running:

ansible-galaxy collection list | grep kubernetes_sigs.kubespray
@etu etu added the kind/bug Categorizes issue or PR as related to a bug. label Nov 29, 2023
@VannTen
Copy link
Contributor

VannTen commented Dec 15, 2023

@yankay
I guess we should probably roughly follow https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_release_with_branches.html
-> aka the content of the version in galaxy.yml should be the next expected version (2.24.0 on master, 2.23.2 on release-2.23 for instance). Then we change it just after a release.
wdyt ?

@yankay
Copy link
Member

yankay commented Dec 18, 2023

@yankay I guess we should probably roughly follow https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_release_with_branches.html -> aka the content of the version in galaxy.yml should be the next expected version (2.24.0 on master, 2.23.2 on release-2.23 for instance). Then we change it just after a release. wdyt ?

Thanks @VannTen

I think so. We should update the https://github.com/kubernetes-sigs/kubespray/blob/master/RELEASE.md to support the ansible-galaxy :-)

@VannTen
Copy link
Contributor

VannTen commented Dec 18, 2023 via email

@yankay
Copy link
Member

yankay commented Dec 18, 2023

I'll take a look. Also, that file looks out of date: I don't think we're currently using milestones at all ?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants