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

validate-modules for plugins: author: required with same conditions as for modules, or optional, or other conditions? #71794

Closed
felixfontein opened this issue Sep 17, 2020 · 3 comments
Labels
affects_2.12 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.

Comments

@felixfontein
Copy link
Contributor

SUMMARY

This is not a bug, but a discussion issue for one aspect of #71734 ([WIP] Extend validate-modules to also validate plugins). It provides details on one of the points in ansible/community#560 (comment).

For modules, the author field is required to follow a very specific form:

# Valid DOCUMENTATION.author lines
# Based on Ansibulbot's extract_github_id()
# author: First Last (@name) [optional anything]
# "Ansible Core Team" - Used by the Bot
# "Michael DeHaan" - nop
# "OpenStack Ansible SIG" - OpenStack does not use GitHub
# "Name (!UNKNOWN)" - For the few untraceable authors
author_line = re.compile(r'^\w.*(\(@([\w-]+)\)|!UNKNOWN)(?![\w.])|^Ansible Core Team$|^Michael DeHaan$|^OpenStack Ansible SIG$')

This is not followed by plugins (since they were not validated). Some plugins have no author entry at all, others have unsupported strings (Ericsson IPOS OAM team for cliconf plugin community.network.eric_eccli, the ansible.builtin.varnames lookup has Ansible Core, ...).

I would suggest to use the same rules as for modules, i.e. require the authors field and use the same validation as for modules.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible-test validate-modules

ANSIBLE VERSION

2.11

bot_skip

@sivel
Copy link
Member

sivel commented Sep 17, 2020

!component =test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py

@ansibot ansibot added affects_2.11 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Sep 17, 2020
@samdoran
Copy link
Contributor

Per discussion today, the author string should be uniformly enforced across modules and plugins. Plugins that fail this validation should be fixed.

@jborean93
Copy link
Contributor

Closing as per the above comment.

@ansible ansible locked and limited conversation to collaborators Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.12 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

No branches or pull requests

6 participants