ansible / ansible-lint-action

❗️Replaced by https://github.com/marketplace/actions/run-ansible-lint
https://github.com/marketplace/actions/run-ansible-lint
MIT License
254 stars 132 forks source link

release 6 is is breaking `override-deps` #88

Closed zerwes closed 2 years ago

zerwes commented 2 years ago

release 6 is is breaking override-deps despite the fact of mentioning the feature in the release notes: Adding functionality to pin ansible-lint versions through input variable (https://github.com/ansible/ansible-lint-action/pull/17) @xUnholy If the syntax has changed, this is not reflected in the README. Example actions: OK: https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-role-unbound/runs/5623708515?check_suite_focus=true ERR: https://github.com/Rosa-Luxemburgstiftung-Berlin/ansible-role-unbound/runs/5655073119?check_suite_focus=true

During the last days, the changes here gave me some headache:

bisect result:

f92921ffd076d017d88ad248626a6d3bf0aa1dbb is the first bad commit
commit f92921ffd076d017d88ad248626a6d3bf0aa1dbb
Author: Sorin Sbarnea <ssbarnea@redhat.com>
Date:   Mon Mar 21 12:28:02 2022 +0000

    Stop building the container (#74)

 Dockerfile | 15 ---------------
 README.md  | 44 ++++----------------------------------------
 action.yml | 47 +++++++++--------------------------------------
 3 files changed, 13 insertions(+), 93 deletions(-)
 delete mode 100644 Dockerfile
GElkayam commented 2 years ago

We had same issues as well, ended up setting uses: ansible-community/ansible-lint-action@c37fb7b4bda2c8cb18f4942716bae9f11b0dc9bc to avoid that. On our case, we are using the old 2.9 form without fully qualified module names, so when it finally ran, we failed on syntax and was unable to find a way to tell ansible-lint what standard of modules we use.

zerwes commented 2 years ago

yes, my current fix is similar:

-        uses: ansible/ansible-lint-action@main
+        uses: ansible/ansible-lint-action@89eb7dec58ac81d46476b715d98e0ec9a411b63f
zerwes commented 2 years ago

We moved a few months ago from 2.9 to 2.12.2 aka. 5.3.0 and have the same fully qualified module names issue for now. As we use a fixed ansible (-lint) version across all repos, we need a option to pin to a fixed ansible / linter version.

ssbarnea commented 2 years ago

The real bug was that this release note entry went in by mistake. With current version is no longer possible to change ansible-lint version, mainly because the tag points to the linter version. We no longer install any python dependencies and use a pre-build container.

ssbarnea commented 2 years ago

To pin ansible-lint version use tags, like v6.0.1. From now on, we will (try to) ensure that tags from this repository point to an image that has exactly that version of the linter, making much easier to identify what is used.

zerwes commented 2 years ago

@ssbarnea the tag -> version for the future seems OK and consistent for me. could you please tag 89eb7dec58ac81d46476b715d98e0ec9a411b63f with something like pre-v6?

ssbarnea commented 2 years ago

I created v4-eol tag.