-
Notifications
You must be signed in to change notification settings - Fork 705
Description
Summary
When using the ansible-lint GitHub Action with a specific version tag (e.g., ansible/[email protected]
or ansible/ansible-lint@v25
), the action installs a development version of ansible-lint (25.6.2.dev25
) instead of the expected stable version, resulting in warnings about missing extras.
Issue Type
- Bug Report
OS / ENVIRONMENT
WARNING: ansible-lint 25.6.2.dev25 does not provide the extra 'lock'
ansible-lint 25.6.2.dev25 using ansible-core:2.17.7 ansible-compat:24.10.0 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.12
You are using a pre-release version of ansible-lint.
- ansible installation method: pip (via GitHub Action)
- ansible-lint installation method: GitHub Action
ansible/[email protected]
and/oransible/ansible-lint@v25
- GitHub Actions runner: ubuntu-latest
- Python version: 3.11 (as set by the action)
STEPS TO REPRODUCE
- Create
.github/workflows/ansible-lint.yml
:
name: ansible-lint
on: [pull_request]
jobs:
build:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/[email protected]
# or uses: ansible/ansible-lint@v25
with:
setup_python: "true"
requirements_file: "meta/requirements.yml"
- Create a simple playbook
test.yml
:
---
- name: Test playbook
hosts: localhost
tasks:
- name: Debug
debug:
msg: "Hello"
- Push to a branch and create a pull request to trigger the workflow
Gist: https://gist.github.com/McSim85/10fabac8c1c3201c19900e9fd51e48a4
Desired Behavior
The action should install ansible-lint version 25.5.0 (or a stable 25.x version) when using the @v25.5.0
/@v25
tag, without warnings about missing extras.
Actual Behavior
The action installs a development version and displays warnings. Looking at the action.yml
file in the v25.5.0 tag, the action installs ansible-lint using:
pip install "ansible-lint[lock] @ git+https://github.com/ansible/ansible-lint@$GH_ACTION_REF"
Where $GH_ACTION_REF
is set to v25.5.0
. This installs from the git tag, but the v25.5.0 tag appears to point to a commit where the version in the codebase is already 25.6.2.dev25
.
Full output from GitHub Actions:
Run ansible/[email protected]
Run action_ref="v25.5.0"
[...]
WARNING: ansible-lint 25.6.2.dev25 does not provide the extra 'lock'
[...]
Collecting ansible-lint[lock]@ git+https://github.com/ansible/[email protected]
Cloning https://github.com/ansible/ansible-lint (to revision v25.5.0) to /tmp/pip-install-x5p9zv2m/ansible-lint_7a8e9f5c5b9d4e3fa5d8c9b0e1234567
[...]
Successfully installed ansible-lint-25.6.2.dev25
ansible-lint 25.6.2.dev25 using ansible-core:2.17.7 ansible-compat:24.10.0 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.12
You are using a pre-release version of ansible-lint.
The warning about the missing [lock]
extra suggests this development version doesn't have this extra defined, even though the action tries to install it.
Probably, relevant Issues and PRs:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status