prometheus-community / ansible

Ansible Collection for Prometheus
https://prometheus-community.github.io/ansible/
Apache License 2.0
396 stars 133 forks source link

Tag v0.20.2 is wrongly marked as Ansible `version: 0.21.0` #435

Closed andygrunwald closed 1 month ago

andygrunwald commented 1 month ago

Context

The release https://github.com/prometheus-community/ansible/releases/tag/0.20.2 is marked as https://github.com/prometheus-community/ansible/blob/f3514a9e97dfc3d64f02aefd299487efd99e779f/galaxy.yml#L4

This is also visible on Ansible Galaxy: https://galaxy.ansible.com/ui/repo/published/prometheus/prometheus/

Screenshot 2024-10-19 at 09 52 31

If you add this version to requirements.yml:

collections:
  # https://github.com/prometheus-community/ansible
  - name: prometheus.prometheus
    version: 0.20.2

The following error will appear:

ANSIBLE_CONFIG="ansible/ansible.cfg" ansible-galaxy collection install -r ansible/requirements.yml --force
Starting galaxy collection install process
Process install dependency map
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* prometheus.prometheus:0.20.2 (direct request)
Hint: Pre-releases hosted on Galaxy or Automation Hub are not installed by default unless a specific version is requested. To enable pre-releases globally, use --pre.

Possible solutions

  1. Create a new release with v0.21.0 (and mark the v0.20.2 in GitHub actions as faulty)
  2. Create a new release with v0.20.3 (and mark the v0.20.2 in GitHub actions as faulty)

I would love to create a PR for this, but this seem to be rather Release related, which may not possible to solve via a PR.

Workaround

Add the following to requirements.yml:

collections:
  # https://github.com/prometheus-community/ansible
  - name: prometheus.prometheus
    version: 0.21.0
gardar commented 1 month ago

Thanks for the heads up! Looks like the CI decided to screw us over for some reason. I manually corrected this so 0.20.2 and 0.21.0 should be correct now, both here in the github releases and on galaxy.