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

Undeprecate numeric rule tags #1447

Closed

Conversation

tadeboro
Copy link
Contributor

@tadeboro tadeboro commented Mar 8, 2021

The reason behind the undeprecation is fairly simple: right now, it is impossible to create a playbook that uses tags that will not trigger any warnings on ansible-lint 4 or 5.

If we use numeric tags, ansible-lint >= 5 will complain. If we use more descriptive tags, introduced in ansible-lint 5.0.0, ansible-lint
< 4 will complain about the errors we want to ignore.

This is especially important for collection authors that publish their work on Ansible Galaxy. On each import, Ansible Galaxy runs
ansible-lint 4 over all of the roles. Those developers are, if they want to have a clean import, forced to use an older version of ansible lint, or have ansible-lint >= 5 complain about numeric tags.

@tadeboro tadeboro requested a review from ssbarnea March 8, 2021 21:13
@tadeboro tadeboro added the bug label Mar 8, 2021
The reason behind the undeprecation is fairly simple: right now, it is
impossible to create a playbook that uses tags that will not trigger
any warnings on ansible-lint 4 or 5.

If we use numeric tags, ansible-lint >= 5 will complain. If we use
more descriptive tags, introduced in ansible-lint 5.0.0, ansible-lint
< 4 will complain about the errors we want to ignore.

This is especially important for collection authors that publish their
work on Ansible Galaxy. On each import, Ansible Galaxy runs
ansible-lint 4 over all of the roles. Those developers are, if they
want to have a clean import, forced to use an older version of ansible
lint, or have ansible-lint >= 5 complain about numeric tags.
@felixfontein
Copy link
Contributor

Delaying the deprecation until later in the 5.x release cycle (or even until 6, depending on how fast that happens) sounds like a good idea!

@ssbarnea
Copy link
Member

ssbarnea commented Mar 9, 2021

I am ok with it but first I want to see some feedback from the galaxy team members. I do not ever remember when it was last time when someone from the galaxy team made a pull request or at least gave feedback on irc or issue tracker. AFAIK there is no proof that any galaxy engineer is watching what we do. Even an ok or not from time to time would be ok.

In fact the version of the linter used by galaxy server is not even documented and we do not have any indication on what is needed to upgrade it.

Without this, I struggle to find motivation to add extra effort/hacks for unsupportive consumers.

How about adding an option to silence the deprecation warning instead? If we do not display anything we cannot drive people to update the code.

@tadeboro
Copy link
Contributor Author

tadeboro commented Mar 9, 2021

Maybe I emphasized the Ansible Galaxy aspect of this problem a bit too much because this is how I discovered that my "port to ansible-lint 5" effort has some unintended side-effects. But the problem is more general. Migrating between two major versions of a tool is already stressful enough. And not being able to have content that produces a clean run on both versions of the tool only increases the stress level because now migration is an all-or-nothing thing.

k,
v,
)
# Do not deprecate the odl tags just yet. Why? Because it is not currently feasible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Do not deprecate the odl tags just yet. Why? Because it is not currently feasible
# Do not deprecate the old tags just yet. Why? Because it is not currently feasible

@ssbarnea ssbarnea requested a review from awcrosby March 10, 2021 12:56
@ssbarnea ssbarnea added this to the 5.0.3 milestone Mar 10, 2021
# Do not deprecate the odl tags just yet. Why? Because it is not currently feasible
# to migrate old tags to new tags. There are a lot of things out there that still
# use ansible-lint 4 (for example, Ansible Galaxy and Automation Hub imports). If we
# replace the odl tags, those tools will report warnings. If we do not replace them,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixfontein You missed this:)

Suggested change
# replace the odl tags, those tools will report warnings. If we do not replace them,
# replace the old tags, those tools will report warnings. If we do not replace them,

@ssbarnea
Copy link
Member

@tadeboro Can you please rebase so i can merge it? Next time create a feature branch so we can edit it (you have this power).

@ssbarnea
Copy link
Member

Closed in favour of #1452 as I cannot rebase this one.

@ssbarnea ssbarnea closed this Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants