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

Extend dev guide for collection testing and collection hacking #68899

Merged
merged 12 commits into from
Apr 15, 2020

Conversation

felixfontein
Copy link
Contributor

SUMMARY

This extends the dev guide with details for working with collections:

  1. running ansible-test in collections;
  2. hacking collections (cloning them and using the cloned ones).

Also contains three tiny only somewhat related improvements:

  1. document new bot commands /rebuild and /rebuild_failed (141d2c2), CC @jctanner;
  2. fix/improve first paragraph of BOTMETA.yml docs for collections (55ae0b5);
  3. update list of Python versions for compile tests (a608b58).

CC @gundalow @maxamillion @mattclay

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

docs/docsite/rst/dev_guide/developing_collections.rst
docs/docsite/rst/dev_guide/testing_compile.rst
docs/docsite/rst/dev_guide/testing.rst

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 12, 2020
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Apr 13, 2020

To run all compile and sanity tests, execute::

ansible-test sanity --docker default --color -v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd omit the --color option, as it's normally auto-detected for interactive use. It should only be needed when piping stdout or on CI systems which do not report stdout as a TTY.

Suggested change
ansible-test sanity --docker default --color -v
ansible-test sanity --docker default -v

The same applies to the other examples below.

I'd also consider using --docker instead of --docker default (but with a note mentioning that using a non-option after it will be seen as a container name).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove --color then.

I included default after --docker to avoid that when people remove --color -v, it suddenly reports "strange" errors when they list an explicit target.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 13, 2020
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 13, 2020
@maxamillion
Copy link
Contributor

This is great, thank you @felixfontein!! 👍

@maxamillion maxamillion self-requested a review April 13, 2020 19:34
@ansibot ansibot removed the core_review In order to be merged, this PR must follow the core review workflow. label Apr 14, 2020
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 14, 2020
Copy link
Contributor

@odyssey4me odyssey4me left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome documentation addition, thank you!

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 14, 2020

Now you can use this checkout of ``community.general`` in playbooks and roles with whichever version of Ansible you have installed locally, including a local checkout of the ``devel`` branch.

For collections hosted in the ``ansible_collections`` GitHub org, create a branch and commit your changes on the branch. When you are done (remember to add tests, see :ref:`testing_collections`), push your changes to your fork of the collection and create a Pull Request. For other collections, especially for collections not hosted on GitHub, check the ``README.md`` of the collection for information on contributing to it.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For collections hosted in the ``ansible_collections`` GitHub org, create a branch and commit your changes on the branch. When you are done (remember to add tests, see :ref:`testing_collections`), push your changes to your fork of the collection and create a Pull Request. For other collections, especially for collections not hosted on GitHub, check the ``README.md`` of the collection for information on contributing to it.
For collections hosted in the ``ansible-collections`` GitHub org, create a branch and commit your changes on the branch. When you are done (remember to add tests, see :ref:`testing_collections`), push your changes to your fork of the collection and create a Pull Request. For other collections, especially for collections not hosted on GitHub, check the ``README.md`` of the collection for information on contributing to it.

It's https://github.com/ansible-collections/ with a dash.

@acozine acozine merged commit abb807e into ansible:devel Apr 15, 2020
@felixfontein felixfontein deleted the collection-testing-docs branch April 15, 2020 20:52
@felixfontein
Copy link
Contributor Author

Thanks everyone for reviewing and your comments, and especially @acozine for heavily improving it!

@ansible ansible locked and limited conversation to collaborators May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. has_issue support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants