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

Sanity tests failing in amazon.aws #804

Closed
1 task done
dmsimard opened this issue May 6, 2022 · 3 comments
Closed
1 task done

Sanity tests failing in amazon.aws #804

dmsimard opened this issue May 6, 2022 · 3 comments
Assignees
Labels
bug This issue/PR relates to a bug has_pr performance python3

Comments

@dmsimard
Copy link

dmsimard commented May 6, 2022

Summary

We are running sanity tests across every collection included in the Ansible community package (as part of this issue) and found that ansible-test sanity --docker against amazon.aws 3.2.0 fails with ansible-core 2.13.0rc1 in ansible 6.0.0a2.

Issue Type

Bug Report

Component Name

n/a

Ansible Version

ansible [core 2.13.0rc1]

Collection Versions

n/a

AWS SDK versions

n/a

Configuration

n/a

OS / Environment

n/a

Steps to Reproduce

ansible-test sanity --docker

Expected Results

Tests are either passing or ignored.

Actual Results

ERROR: Found 29 validate-modules issue(s) which need to be resolved:
ERROR: plugins/callback/aws_resource_actions.py:0:0: invalid-documentation: DOCUMENTATION.callback: extra keys not allowed @ data['callback']. Got 'aws_resource_actions'
ERROR: plugins/callback/aws_resource_actions.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/inventory/aws_ec2.py:0:0: invalid-documentation: DOCUMENTATION.plugin_type: extra keys not allowed @ data['plugin_type']. Got 'inventory'
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.exclude_filters: Argument defines type as list but elements is not defined for dictionary value @ data['options']['exclude_filters']. Got {'description': ['A list of filters. Any instances matching one of the filters are excluded from the result.', 'The filters from C(exclude_filters) take priority over the C(include_filters) and C(filters) keys', 'Available filters are listed here U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', "Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible."], 'type': 'lis...
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.hostnames: Argument defines type as list but elements is not defined for dictionary value @ data['options']['hostnames']. Got {'description': ['A list in order of precedence for hostname variables.', 'You can use the options specified in U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', 'To use tags as hostnames use the syntax tag:Name=Value to use the hostname Name_Value, or tag:Name to use the value of the Name tag.'], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.include_filters: Argument defines type as list but elements is not defined for dictionary value @ data['options']['include_filters']. Got {'description': ['A list of filters. Any instances matching at least one of the filters are included in the result.', 'Available filters are listed here U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', "Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible."], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.regions: Argument defines type as list but elements is not defined for dictionary value @ data['options']['regions']. Got {'description': ['A list of regions in which to describe EC2 instances.', 'If empty (the default) default this will include all regions, except possibly restricted ones like us-gov-west-1 and cn-north-1.'], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_rds.py:0:0: invalid-documentation: DOCUMENTATION.note: extra keys not allowed @ data['note']. Got "Ansible versions prior to 2.10 should use the fully qualified plugin name 'amazon.aws.aws_rds'."
ERROR: plugins/inventory/aws_rds.py:0:0: invalid-documentation: DOCUMENTATION.plugin_type: extra keys not allowed @ data['plugin_type']. Got 'inventory'
ERROR: plugins/inventory/aws_rds.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.statuses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['statuses']. Got {'description': "A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything.", 'type': 'list', 'default': ['creating', 'available']}
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Sloane Hertel <[email protected]>']
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_account_attribute'
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Aaron Smith <[email protected]>']
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_secret'
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['James Turner <[email protected]>']
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_service_ip_ranges'
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Bill Wang <ozbillwang(at)gmail.com>', 'Marat Bakeev <hawara(at)gmail.com>', 'Michael De La Rue <[email protected]>']
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_ssm'
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/modules/aws_az_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/aws_az_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/aws_az_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'aws_az_info'
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.groups: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['groups']. Got {'description': ['a list of security group IDs to attach to the interface'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.interfaces: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['interfaces']. Got {'description': ['a list of ENI IDs (strings) or a list of objects containing the key I(id).'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.ipv6_addresses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['ipv6_addresses']. Got {'description': ['a list of IPv6 addresses to assign to the network interface'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.private_ip_addresses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['private_ip_addresses']. Got {'description': ['a list of IPv4 addresses to assign to the network interface'], 'type': 'list'}
ERROR: The 1 sanity test(s) listed below (out of 43) failed. See error output above for details.
validate-modules
ERROR: Command "podman exec ansible-test-controller-LdbiEfzQ /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/amazon/aws LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-omh2yaq0.json --truncate 0 --color no --host-path tests/output/.tmp/host-mwwn6sjy" returned exit status 1.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@dmsimard
Copy link
Author

I've reran the tests against the same release but by installing with ansible-galaxy collection install instead of the release tarball and this time there's 26 issues instead of 29:

RROR: Found 26 validate-modules issue(s) which need to be resolved:
ERROR: plugins/callback/aws_resource_actions.py:0:0: invalid-documentation: DOCUMENTATION.callback: extra keys not allowed @ data['callback']. Got 'aws_resource_actions'
ERROR: plugins/callback/aws_resource_actions.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/inventory/aws_ec2.py:0:0: invalid-documentation: DOCUMENTATION.plugin_type: extra keys not allowed @ data['plugin_type']. Got 'inventory'
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.exclude_filters: Argument defines type as list but elements is not defined for dictionary value @ data['options']['exclude_filters']. Got {'description': ['A list of filters. Any instances matching one of the filters are excluded from the result.', 'The filters from C(exclude_filters) take priority over the C(include_filters) and C(filters) keys', 'Available filters are listed here U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', "Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible."], 'type': 'lis...
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.hostnames: Argument defines type as list but elements is not defined for dictionary value @ data['options']['hostnames']. Got {'description': ['A list in order of precedence for hostname variables.', 'You can use the options specified in U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', 'To use tags as hostnames use the syntax tag:Name=Value to use the hostname Name_Value, or tag:Name to use the value of the Name tag.'], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.include_filters: Argument defines type as list but elements is not defined for dictionary value @ data['options']['include_filters']. Got {'description': ['A list of filters. Any instances matching at least one of the filters are included in the result.', 'Available filters are listed here U(http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options).', "Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible."], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_ec2.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.regions: Argument defines type as list but elements is not defined for dictionary value @ data['options']['regions']. Got {'description': ['A list of regions in which to describe EC2 instances.', 'If empty (the default) default this will include all regions, except possibly restricted ones like us-gov-west-1 and cn-north-1.'], 'type': 'list', 'default': []}
ERROR: plugins/inventory/aws_rds.py:0:0: invalid-documentation: DOCUMENTATION.note: extra keys not allowed @ data['note']. Got "Ansible versions prior to 2.10 should use the fully qualified plugin name 'amazon.aws.aws_rds'."
ERROR: plugins/inventory/aws_rds.py:0:0: invalid-documentation: DOCUMENTATION.plugin_type: extra keys not allowed @ data['plugin_type']. Got 'inventory'
ERROR: plugins/inventory/aws_rds.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.statuses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['statuses']. Got {'description': "A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything.", 'type': 'list', 'default': ['creating', 'available']}
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Sloane Hertel <[email protected]>']
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_account_attribute'
ERROR: plugins/lookup/aws_account_attribute.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Aaron Smith <[email protected]>']
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_secret'
ERROR: plugins/lookup/aws_secret.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['James Turner <[email protected]>']
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_service_ip_ranges'
ERROR: plugins/lookup/aws_service_ip_ranges.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.author: Invalid author for dictionary value @ data['author']. Got ['Bill Wang <ozbillwang(at)gmail.com>', 'Marat Bakeev <hawara(at)gmail.com>', 'Michael De La Rue <[email protected]>']
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.lookup: extra keys not allowed @ data['lookup']. Got 'aws_ssm'
ERROR: plugins/lookup/aws_ssm.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.groups: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['groups']. Got {'description': ['a list of security group IDs to attach to the interface'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.interfaces: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['interfaces']. Got {'description': ['a list of ENI IDs (strings) or a list of objects containing the key I(id).'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.ipv6_addresses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['ipv6_addresses']. Got {'description': ['a list of IPv6 addresses to assign to the network interface'], 'type': 'list'}
ERROR: plugins/modules/ec2_instance.py:0:0: parameter-list-no-elements: DOCUMENTATION.options.network.suboptions.private_ip_addresses: Argument defines type as list but elements is not defined for dictionary value @ data['options']['network']['suboptions']['private_ip_addresses']. Got {'description': ['a list of IPv4 addresses to assign to the network interface'], 'type': 'list'}
ERROR: The 1 sanity test(s) listed below (out of 43) failed. See error output above for details.
validate-modules
ERROR: Command "podman exec ansible-test-controller-jJBV5g9K /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/amazon/aws LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-is3s7o3g.json --truncate 0 --color no --host-path tests/output/.tmp/host-efqgz5dv" returned exit status 1.

softwarefactory-project-zuul bot pushed a commit that referenced this issue May 15, 2022
Fix linting issues. (#701)

Should fix #804
Fix linting issues reported by validate-modules in plugins
SUMMARY
See ansible-collections/news-for-maintainers#9.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
various
Reviewed-by: Jill R 
SUMMARY


ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Gonéri Le Bouder <[email protected]>
tremble pushed a commit to tremble/amazon.aws that referenced this issue May 19, 2022
Fix linting issues. (ansible-collections#701)

Should fix ansible-collections#804
Fix linting issues reported by validate-modules in plugins
SUMMARY
See ansible-collections/news-for-maintainers#9.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
various
Reviewed-by: Jill R
SUMMARY

ISSUE TYPE

Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Gonéri Le Bouder <[email protected]>
tremble added a commit that referenced this issue May 19, 2022
Fix linting issues. (#701)

Should fix #804
Fix linting issues reported by validate-modules in plugins
SUMMARY
See ansible-collections/news-for-maintainers#9.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
various
Reviewed-by: Jill R
SUMMARY

ISSUE TYPE

Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Gonéri Le Bouder <[email protected]>

Co-authored-by: Alina Buzachis <[email protected]>
@tremble
Copy link
Contributor

tremble commented Jul 10, 2022

Fixed a while back

@tremble tremble closed this as completed Jul 10, 2022
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
Add wildcard to credentials file in .gitignore

SUMMARY
In addition to the static cloud-config-aws.(ini|yml) files devs can create, ansible-test may also create temporary credentials files with random strings in the filename.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
gitignore

Reviewed-by: Mark Chappell <None>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr performance python3
Projects
None yet
Development

No branches or pull requests

5 participants