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

Community package requirements: sanity tests #672

Open
gotmax23 opened this issue Jan 23, 2024 · 1 comment
Open

Community package requirements: sanity tests #672

gotmax23 opened this issue Jan 23, 2024 · 1 comment

Comments

@gotmax23
Copy link

(Note: This issue was filed in a semi-automated fashion. Let me know if you see errors in this issue.)

As per the Ansible community package inclusion requirements, collections must pass ansible-test sanity tests. Version 2.4.0 of kubernetes.core, corresponding to the 2.4.0 tag in this repo, fails one or more of the required sanity tests.

Please see the errors below and address them. If these issues aren't addressed within a reasonable time period, the collection may be subject to removal from Ansible.

Thank you for your efforts and for being part of the Ansible package! We appreciate it.


Sanity tests

The following tests were run using ansible-test version 2.16.1:

  • ansible-doc
  • compile
  • validate-modules
  • yamllint

Note that this is only a subset of the required sanity tests. Please make sure you run them in all in your CI.

Results

💡 NOTE:

Check the [explain] links below for more information about each test and how to fix failures.
See Sanity Tests: Ignores in the dev guide if, after reading the test-specific documentation, you still believe an error is a false positive.

The test ansible-test sanity --test validate-modules [explain] failed with 25 errors:

plugins/modules/helm_info.py:0:0: doc-default-does-not-match-spec: Argument 'release_state' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/helm_template.py:0:0: doc-default-does-not-match-spec: Argument 'show_only' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s.py:0:0: parameter-type-not-in-doc: Argument 'resource_definition' in argument_spec defines type as <function list_dict_str at 0x7f25ee49c180> but documentation doesn't define type
plugins/modules/k8s.py:0:0: return-syntax-error: RETURN.result.contains.error.contains: required key not provided @ data['result']['contains']['error']['contains']. Got None
plugins/modules/k8s.py:0:0: return-syntax-error: RETURN.result.contains.metadata.contains: required key not provided @ data['result']['contains']['metadata']['contains']. Got None
plugins/modules/k8s.py:0:0: return-syntax-error: RETURN.result.contains.spec.contains: required key not provided @ data['result']['contains']['spec']['contains']. Got None
plugins/modules/k8s.py:0:0: return-syntax-error: RETURN.result.contains.status.contains: required key not provided @ data['result']['contains']['status']['contains']. Got None
plugins/modules/k8s_drain.py:0:0: doc-default-does-not-match-spec: Argument 'delete_options' in argument_spec defines default as ({}) but documentation defines default as (None)
plugins/modules/k8s_info.py:0:0: doc-default-does-not-match-spec: Argument 'field_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_info.py:0:0: doc-default-does-not-match-spec: Argument 'label_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_log.py:0:0: doc-default-does-not-match-spec: Argument 'label_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_rollback.py:0:0: doc-default-does-not-match-spec: Argument 'field_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_rollback.py:0:0: doc-default-does-not-match-spec: Argument 'label_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_scale.py:0:0: doc-default-does-not-match-spec: Argument 'label_selectors' in argument_spec defines default as ([]) but documentation defines default as (None)
plugins/modules/k8s_scale.py:0:0: parameter-type-not-in-doc: Argument 'resource_definition' in argument_spec defines type as <function list_dict_str at 0x7f25ee49c180> but documentation doesn't define type
plugins/modules/k8s_scale.py:0:0: return-syntax-error: RETURN.result.contains.metadata.contains: required key not provided @ data['result']['contains']['metadata']['contains']. Got None
plugins/modules/k8s_scale.py:0:0: return-syntax-error: RETURN.result.contains.spec.contains: required key not provided @ data['result']['contains']['spec']['contains']. Got None
plugins/modules/k8s_scale.py:0:0: return-syntax-error: RETURN.result.contains.status.contains: required key not provided @ data['result']['contains']['status']['contains']. Got None
plugins/modules/k8s_service.py:0:0: parameter-type-not-in-doc: Argument 'resource_definition' in argument_spec defines type as <function list_dict_str at 0x7f25ee49c180> but documentation doesn't define type
plugins/modules/k8s_service.py:0:0: return-syntax-error: RETURN.result.contains.metadata.contains: required key not provided @ data['result']['contains']['metadata']['contains']. Got None
plugins/modules/k8s_service.py:0:0: return-syntax-error: RETURN.result.contains.spec.contains: required key not provided @ data['result']['contains']['spec']['contains']. Got None
plugins/modules/k8s_service.py:0:0: return-syntax-error: RETURN.result.contains.status.contains: required key not provided @ data['result']['contains']['status']['contains']. Got None
plugins/modules/k8s_taint.py:0:0: return-syntax-error: RETURN.result.contains.metadata.contains: required key not provided @ data['result']['contains']['metadata']['contains']. Got None
plugins/modules/k8s_taint.py:0:0: return-syntax-error: RETURN.result.contains.spec.contains: required key not provided @ data['result']['contains']['spec']['contains']. Got None
plugins/modules/k8s_taint.py:0:0: return-syntax-error: RETURN.result.contains.status.contains: required key not provided @ data['result']['contains']['status']['contains']. Got None

The test ansible-test sanity --test yamllint [explain] failed with 9 errors:

tests/integration/targets/helm/files/appversionless-chart-v2/templates/configmap.yaml:6:13: unparsable-with-libyaml: while constructing a mapping - found unhashable key
tests/integration/targets/helm/files/appversionless-chart/templates/configmap.yaml:6:13: unparsable-with-libyaml: while constructing a mapping - found unhashable key
tests/integration/targets/helm/files/test-chart-v2/templates/configmap.yaml:6:13: unparsable-with-libyaml: while constructing a mapping - found unhashable key
tests/integration/targets/helm/files/test-chart/templates/configmap.yaml:6:13: unparsable-with-libyaml: while constructing a mapping - found unhashable key
tests/integration/targets/helm_diff/files/test-chart/templates/configmap.yaml:6:13: unparsable-with-libyaml: while constructing a mapping - found unhashable key
tests/integration/targets/k8s_scale/files/deployment.yaml:26:1: unparsable-with-libyaml: expected a single document in the stream - but found another document
tests/unit/module_utils/fixtures/definitions.yml:6:1: unparsable-with-libyaml: expected a single document in the stream - but found another document
tests/unit/module_utils/fixtures/deployments.yml:25:1: unparsable-with-libyaml: expected a single document in the stream - but found another document
tests/unit/module_utils/fixtures/pods.yml:18:1: unparsable-with-libyaml: expected a single document in the stream - but found another document
@gotmax23
Copy link
Author

Thanks for quickly fixing the issues! We have rerun tests for this collection against the latest version of ansible and found that tests/sanity/ignore-2.17.txt contain ignores that are forbidden by the CI testing requirements. See https://github.com/ansible-community/package-test-results/blob/main/rendered/10.3.0/kubernetes.core.md#invalid-test-ignores for a list. Other than that, this looks good to go. Thanks again for your work on kubernetes.core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant