-
Notifications
You must be signed in to change notification settings - Fork 166
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 #1703
Comments
What can i say... Not every yml file is meant to be a playbook. And these live in the tests directory. For all intents and purpose they are to be considered test data and should not be subject to any linter. |
I agree. Additionally, these files are not distributed as part of the artifact the we upload to Galaxy. |
Thanks for the quick response! The sources are pulled from the v3.15.0 tag in this repository. We are not using Galaxy artifacts here, as they may be missing files that are needed to run the sanity tests. Individual collections should always be running sanity tests in their upstream CI, so we are mirroring that by checking out the repo contents. If those files should not be linted, then you can add test ignores for them. |
But now you're arguably getting more files than necessary? Why wouldn't sanity run on the artifact in Galaxy? Doesn't Galaxy run sanity on import anyway? |
No, Ansible Galaxy runs a different set of tests on import. |
And as far as i remember, we run that sanity check. So what's the issue in the first place now? |
We run it from a "cleaned up" collection ( |
I know, because I was part of that design, and we had some good reasons to do it that way. |
Right, that's something we considered. We took a compromise approach. The script that runs the sanity tests across collections compares the hashes of the files in the collection artifact to those in the git repository. Some collection artifacts entirely exclude the I would consider allowing collections that generate files or do other source preprocessing and don't remove test files from their galaxy artifacts to choose that we run sanity tests from those instead of the git repositories, but that would require some code changes to the |
Let me invite you to have a look at the Makefile here, to see how we always build a clean collection artifact from potentially unclean repository checkouts. |
(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. Version3.15.0
oftheforeman.foreman
, corresponding to thev3.15.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
version2.16.1
:Note that this is only a subset of the required sanity tests. Please make sure you run them in all in your CI.
Results
The test
ansible-test sanity --test yamllint
[explain] failed with 153 errors:The text was updated successfully, but these errors were encountered: