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

Tidy up validate-modules nonexistent-parameter-documented #1389

Merged
merged 8 commits into from
Nov 26, 2020
Merged

Tidy up validate-modules nonexistent-parameter-documented #1389

merged 8 commits into from
Nov 26, 2020

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Nov 25, 2020

SUMMARY

Tidy up on sanity tests' ignore files, removing lines with validation-modules for these modules.

The focus was to pass the tests so no code was changed other than adjusting argument_spec for missing types or inconsistencies with the docs. The priority has been not to change any functionality, but to ensure that code and docs are synchronized.

Some lines were added back to the files, but a total of 17 lines were removed (among 2.9, 2.10 and 2.11).

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

plugins/modules/storage/zfs/zpool_facts.py
plugins/modules/storage/zfs/zfs_facts.py
plugins/modules/net_tools/nios/nios_host_record.py
plugins/modules/cloud/univention/udm_share.py
plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

ADDITIONAL INFORMATION

@felixfontein
Copy link
Collaborator

The first three modules also have undocumented-parameter. Maybe there's a typo/other discrepancy in the option name?

@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Nov 25, 2020
@ansibullbot
Copy link
Collaborator

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

plugins/modules/notification/grove.py:0:0: nonexistent-parameter-documented: Argument 'message' is listed in DOCUMENTATION.options, but not accepted by the module argument_spec

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

plugins/modules/notification/grove.py:0:0: nonexistent-parameter-documented: Argument 'message' is listed in DOCUMENTATION.options, but not accepted by the module argument_spec

click here for bot help

@russoz
Copy link
Collaborator Author

russoz commented Nov 25, 2020

@felixfontein @keachi thanks for reviewing! Will update the samba option soon.

In the meanwhile, any idea what's going on with grove.py?

    module = AnsibleModule(
        argument_spec=dict(
            channel_token=dict(type='str', required=True, no_log=True),
            message=dict(type='str', required=True),
            service=dict(type='str', default='ansible'),
            url=dict(type='str', default=None),
            icon_url=dict(type='str', default=None),
            validate_certs=dict(default=True, type='bool'),
        )
    )

Parameter message is accepted in the module argument_spec.

@felixfontein
Copy link
Collaborator

@russoz that's because message is an invalid option name (see the other ignore.txt entry). It's interesting that this wasn't fixed, because this way, the module probably will not work at all.

@felixfontein
Copy link
Collaborator

Looks like some modules have this problem. Here's the original PR that fixed some, and added the sanity test: https://github.com/ansible/ansible/pull/60051/files

@ansibullbot
Copy link
Collaborator

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

tests/sanity/ignore-2.9.txt:197:1: A100: Ignoring 'undocumented-parameter' on 'plugins/modules/cloud/univention/udm_share.py' is unnecessary

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

tests/sanity/ignore-2.10.txt:227:1: A100: Ignoring 'undocumented-parameter' on 'plugins/modules/cloud/univention/udm_share.py' is unnecessary

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

tests/sanity/ignore-2.11.txt:227:1: A100: Ignoring 'undocumented-parameter' on 'plugins/modules/cloud/univention/udm_share.py' is unnecessary

click here for bot help

@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Nov 26, 2020
@ansibullbot ansibullbot removed the ci_verified Push fixes to PR branch to re-run CI label Nov 26, 2020
@felixfontein felixfontein merged commit 7f890c4 into ansible-collections:main Nov 26, 2020
patchback bot pushed a commit that referenced this pull request Nov 26, 2020
* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_share.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_facts.py

* fixed validation-modules for plugins/modules/storage/zfs/zpool_facts.py

* Tidy up validate-modules ignores nonexistent-parameter-documented

* Adjustments per the PR

* Removed no longer needed ignore line for udm_share.py

(cherry picked from commit 7f890c4)
@felixfontein
Copy link
Collaborator

@russoz thanks for fixing this!
@keachi thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Nov 26, 2020
)

* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_share.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_facts.py

* fixed validation-modules for plugins/modules/storage/zfs/zpool_facts.py

* Tidy up validate-modules ignores nonexistent-parameter-documented

* Adjustments per the PR

* Removed no longer needed ignore line for udm_share.py

(cherry picked from commit 7f890c4)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
@russoz
Copy link
Collaborator Author

russoz commented Nov 26, 2020 via email

@russoz russoz deleted the valmod_nonexistent_param branch November 26, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud docs module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR net_tools plugins plugin (any type) storage tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants