-
Notifications
You must be signed in to change notification settings - Fork 9
Standardize of tests/requirements.yml #230
Comments
simplest solution is not to alter any formats, just move to sudirs:
And use existing supported |
@felixfontein I think that the proposal above has very good selling points. We will only have to split the current 18 files into two other files and the problem would be sorted. All files will have the same file format and tools using them might decide to ignore some of them. |
A Galaxy dependency file per directory sounds like a good idea. Is there a standard directory for molecule tests in collections BTW? |
I do have a PR in progress for changing linter/compat and making it recognize invalid requirements.yml file with a message like:
We will have to fix those community collections manually to remove the undocumented/unsupported "integration_tests_dependencies" bits, so people will not get confused. I will do PRs for some of them, lucky we don't have so many. |
I created some more PRs for all collections I have locally checked out. |
Gives explicit error message about invalid requirements.yml files, especially as an unsupported format was used during the 2020 split. Closes: #274 Related: ansible-community/community-topics#230
I've had a look at @bcoca @felixfontein @ssbarnea Is this a file we should aim to get rid of, too? There are quite some collections in ansible-collections that have this file. |
I agree with @mariolenz but we probably need to do this in gradual steps. For example I want to add an entire documentation page into the linter about where to put requirements, so we can tell people to follow it. Regarding requirements.txt -- these are very different than ansible ones (.yml), do not confuse them. For know the linter does nothing about them. BTW, I am quite happy to see that a solution slowly emerges here. |
@ssbarnea FYI I ran into a problem when I removed test-requirements.txt. I agree that we should do this in gradual steps. Actually, I don't even know if this file is a problem... just wanted to mention it so you could have a look. |
The standard places for Python test requirements are No idea why it was introduced or by whom. |
Switch to Ansible Galaxy compatible requirements files for tests SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell (cherry picked from commit e80bf93)
Switch to Ansible Galaxy compatible requirements files for tests SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell (cherry picked from commit e80bf93)
) (#1565) [PR #1564/6d62d39d backport][stable-5] Switch to Ansible Galaxy compatible requirements files for tests This is a backport of PR #1564 as merged into main (6d62d39). SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell
) (#1566) [PR #1564/6d62d39d backport][stable-6] Switch to Ansible Galaxy compatible requirements files for tests This is a backport of PR #1564 as merged into main (6d62d39). SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell
…tible requirements files for tests (#1817) [PR #1816/e80bf933 backport][stable-5] Switch to Ansible Galaxy compatible requirements files for tests This is a backport of PR #1816 as merged into main (e80bf93). SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell
I've tried to remove the file but then Zuul fails with:
|
[WIP] Fix test requirements Related: ansible-community/community-topics#230
Related: ansible-community/community-topics#230 (cherry picked from commit 202da7c)
Related: ansible-community/community-topics#230 (cherry picked from commit 202da7c)
Related: ansible-community/community-topics#230 (cherry picked from commit 202da7c) Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Related: ansible-community/community-topics#230 (cherry picked from commit 202da7c) Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
…) (#1818) [PR #1816/e80bf933 backport][stable-6] Switch to Ansible Galaxy compatible requirements files for tests This is a backport of PR #1816 as merged into main (e80bf93). SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Mark Chappell
…irements.yml file Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
…irements.yml file Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
…irements.yml file Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
…irements.yml file Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
…irements.yml file (#81) Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
Switch to Ansible Galaxy compatible requirements files for tests SUMMARY See ansible-community/community-topics#230. ISSUE TYPE Test Pull Request COMPONENT NAME test requirements files Reviewed-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
@ssbarnea Please close this issue if done, or open a new forum topic and then close the issue with a pointer to the new discussion: Community-topics: Archiving the repo |
I think this is kind of standardized, so we can close it. The only thing left is to document the result somewhere. Because right now, it is nowhere documented as a standard... @ssbarnea is this somewhat documented in the ansible-lint docs? |
as it's still possible to write comments here, let's close it and move this to the forum if needed, thanks everyone! |
Summary
Apparently we currently have 18/19 collections that have a
tests/requirements.yml
file that is not loaded by any tool and that is not compatible with our officialrequirements.yml
schema.Current unsupported format looks inspired from old requirements v1 format:
In order to improve the development experience we should aim to find an answer to the following questions:
requirements.yml
to allow it to specify test requirements? Obviously that this means that ansible-galaxy or hub should just ignore the unknown content instead of choking when encountering it.tags
to mark dependencies that are used only for testing?unit
andintegration
type of dependencies?Now is probably the right time to make suggestions and get these right and hopefully future proof.
Additional Information
Possible impact on other tools:
roles:
andcollections:
on arequirements.yml
file. That is big bad because it does not allow us to extend the file for incorporating test requirements via new keys. If we try to add special tags for test requirements, they will install with older versions of ansible-galaxy that do not know to skip these tags. Bit bad, I wonder if core team can help use with some ideas here.requirements.yml
filesThe text was updated successfully, but these errors were encountered: