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

[WIP] ansible-test: allow version_added tests for collections #69291

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

felixfontein
Copy link
Contributor

@felixfontein felixfontein commented May 2, 2020

SUMMARY

IMO this is necessary for proper module documentation.

This is a WIP since it builds on top of #66920 for some collection-related data handling. I've tested it manually with community.crypto, and it works as expected.

There is now a new option, --collection-version_added, which uses the collection's version by default (extracted from galaxy.yml resp. MANIFEST.json), or an explicit value like 1.0.0 when the form --collection-version_added 1.0.0 is used. This allows collections to chose their own strategy on what kind of values version_added should get.

For this to work, both --base-branch and --docker-keep-git have to be specified (the latter only when running with --docker), like this:

ansible-test sanity --docker --docker-keep-git -v --collection-version_added 1.0.0 --base-branch master --test validate-modules
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible-test

@ansibot ansibot added WIP affects_2.10 feature needs_triage support:core test labels May 2, 2020
@gundalow gundalow added the bucket4 label May 2, 2020
@jimi-c jimi-c removed the needs_triage label May 5, 2020
@bcoca bcoca added this to Approved: Prioritised work that blocks release. All things here need to be assigned in ansible-base 2.10 May 6, 2020
@bcoca bcoca moved this from Approved: Prioritised work that blocks release. All things here need to be assigned to In Progress: Dev places card in this column when they are *ACTIVELY* working on it. Use WIP on PRs that are not yet complete in ansible-base 2.10 May 6, 2020
@ansibot ansibot added the needs_rebase label May 7, 2020
@felixfontein felixfontein force-pushed the version_added-collections branch from 293b1cd to cb0aeeb Compare May 7, 2020
@ansibot ansibot removed the needs_rebase label May 7, 2020
@felixfontein felixfontein force-pushed the version_added-collections branch from cb0aeeb to d49fcdf Compare May 13, 2020
@felixfontein
Copy link
Contributor Author

felixfontein commented May 14, 2020

/rebuild_failed

@felixfontein felixfontein changed the title [WIP] ansible-test: allow version_added tests for collections ansible-test: allow version_added tests for collections May 14, 2020
@felixfontein
Copy link
Contributor Author

felixfontein commented May 14, 2020

ready_for_review

@ansibot ansibot added needs_revision core_review and removed WIP needs_revision labels May 14, 2020
@mattclay
Copy link
Member

mattclay commented May 14, 2020

@felixfontein Can you explain what this feature would be used for?

@felixfontein
Copy link
Contributor Author

felixfontein commented May 15, 2020

@mattclay the use-case is to use ansible-test to make sure that verison_added is added in collections for new options and modules with the corrrect value, and not modified for existing ones. Because right now, all version_added tests are restricted to ansible-base, so there are no checks at all for collections.

At the last docs meeting, we agreed that version_added should be used with the collection version for new features.

@ansibot ansibot added needs_revision and removed core_review labels May 15, 2020
@felixfontein
Copy link
Contributor Author

felixfontein commented Jul 28, 2020

/rebuild

@ansibot ansibot added the stale_ci label Aug 6, 2020
@felixfontein felixfontein force-pushed the version_added-collections branch from 137ccc9 to dd6b6f7 Compare Aug 27, 2020
@ansibot ansibot removed the stale_ci label Aug 27, 2020
@felixfontein
Copy link
Contributor Author

felixfontein commented Aug 28, 2020

/rebuild_failed

@ansibot ansibot added the stale_ci label Sep 8, 2020
@ansibot ansibot added pre_azp and removed stale_ci labels Dec 5, 2020
@felixfontein felixfontein force-pushed the version_added-collections branch from dd6b6f7 to f25e522 Compare Feb 14, 2021
@ansibot ansibot removed the pre_azp label Feb 14, 2021
@felixfontein felixfontein force-pushed the version_added-collections branch from 71e0559 to f25e522 Compare Feb 14, 2021
@ansibot ansibot added the stale_ci label Feb 22, 2021
@ansibot ansibot added the needs_rebase label May 13, 2021
@felixfontein felixfontein force-pushed the version_added-collections branch from f25e522 to ce1d8df Compare Mar 4, 2022
@ansibot ansibot added needs_ci and removed stale_ci labels Mar 4, 2022
@felixfontein felixfontein force-pushed the version_added-collections branch 2 times, most recently from 5c3542b to f64fea5 Compare Mar 4, 2022
@ansibot ansibot removed needs_ci needs_rebase labels Mar 4, 2022
Always validate version_added on module level if it is there.
Validate all version numbers via schema.
@felixfontein felixfontein force-pushed the version_added-collections branch from f64fea5 to 73e4c04 Compare Mar 4, 2022
@felixfontein
Copy link
Contributor Author

felixfontein commented Mar 5, 2022

This PR currently has a problem with the symlinks in community.general; since we want to get rid of them soon anyway (for the next major release) I don't think it makes sense adding extra code to handle them.

@ansibot ansibot added the stale_ci label Mar 13, 2022
@ansibot ansibot added the needs_rebase label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 ansible-2.10-plan bucket4 docs docsite feature has_issue needs_rebase needs_revision stale_ci support:core test WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants