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

Update integration test guide docker flag usage #1731

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

MatthiasKunnen
Copy link
Contributor

@MatthiasKunnen MatthiasKunnen commented Aug 5, 2024

The integration tests guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system. Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

This relates to, and fixes, ansible-collections/community.general#8683.

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.
@ansible-documentation-bot ansible-documentation-bot bot added the new_contributor This PR is the first contribution by a new community member. label Aug 5, 2024
@ansible-documentation-bot
Copy link
Contributor

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.

Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

@MatthiasKunnen Thanks for the PR! The changes to the integration test guide look good. I'd appreciate if you could take a look at line 248. Maybe this is the result of the git workflow or something. I'd prefer if that line wasn't touched in this commit as it is separate to the actual update. Cheers.

@@ -72,7 +72,7 @@ outside of those test subdirectories. They will also not reconfigure or bounce

.. note:: Running integration tests within containers

To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option, for example ``--docker ubuntu2004``. See the `list of supported container images <https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_data/completion/docker.txt>`_ for options (the ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules).
To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option, for example ``--docker ubuntu2204``. Get the list of supported container images by running ``ansible-test integration --help`` (the ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules).
Copy link
Contributor Author

@MatthiasKunnen MatthiasKunnen Aug 6, 2024

Choose a reason for hiding this comment

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

Suggested change
To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option, for example ``--docker ubuntu2204``. Get the list of supported container images by running ``ansible-test integration --help`` (the ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules).
To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option, for example ``--docker ubuntu2204``. Get the list of supported container images by running ``ansible-test integration --help``. Look for *target docker images* (the ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules).

@oraNod, sorry for this late addition, I would add this part too, what do you think?
This is because the --help output is quite long and to avoid confusion with the controller docker images section.

Copy link
Contributor

Choose a reason for hiding this comment

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

@MatthiasKunnen No problem! That seems helpful to me. I would possibly rephrase it a little though.

Get the list of supported container images by running ``ansible-test integration --help``. You can find available images in the *target docker images* section of the output. The ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules.

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've committed a proposal

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks again @MatthiasKunnen That looks great.

@oraNod oraNod added backport-2.15 Automatically create a backport for the stable-2.15 branch backport-2.16 Automatically create a backport for the stable-2.16 branch backport-2.17 Automatically create a backport for the stable-2.17 branch labels Aug 7, 2024
@oraNod oraNod merged commit e2137b1 into ansible:devel Aug 7, 2024
9 checks passed
Copy link

patchback bot commented Aug 7, 2024

Backport to stable-2.15: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply e2137b1 on top of patchback/backports/stable-2.15/e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421/pr-1731

Backporting merged PR #1731 into devel

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible/ansible-documentation.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-2.15/e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421/pr-1731 upstream/stable-2.15
  4. Now, cherry-pick PR Update integration test guide docker flag usage #1731 contents into that branch:
    $ git cherry-pick -x e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421
    If it'll yell at you with something like fatal: Commit e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Update integration test guide docker flag usage #1731 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-2.15/e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421/pr-1731
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link

patchback bot commented Aug 7, 2024

Backport to stable-2.16: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2.16/e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421/pr-1731

Backported as #1736

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Aug 7, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)
Copy link

patchback bot commented Aug 7, 2024

Backport to stable-2.17: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2.17/e2137b19a5bbc9cc7406fb5f45af4b3f1a75b421/pr-1731

Backported as #1737

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Aug 7, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)
oraNod pushed a commit that referenced this pull request Aug 7, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)

Co-authored-by: Matthias Kunnen <[email protected]>
oraNod pushed a commit that referenced this pull request Aug 7, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)

Co-authored-by: Matthias Kunnen <[email protected]>
@MatthiasKunnen MatthiasKunnen deleted the patch-1 branch August 7, 2024 14:15
@MatthiasKunnen
Copy link
Contributor Author

@oraNod, do you want me to follow the steps by patchback for 2.15 #1731 (comment)?

@oraNod
Copy link
Contributor

oraNod commented Aug 7, 2024

@oraNod, do you want me to follow the steps by patchback for 2.15 #1731 (comment)?

@MatthiasKunnen Hey, thanks for following up. Sorry for the delay, just got distracted and a bit sidetracked. If you'd like to do that, it would be fine and appreciated. However our general rule is that we always backport from devel to the latest branch, in this case that would be stable-2.17. Anything after that is a bonus. So it wouldn't hurt to have the changes on stable-2.15 but it is more or less optional. If you would like to do that, please feel free (and thanks again!).

MatthiasKunnen added a commit to MatthiasKunnen/ansible-documentation that referenced this pull request Aug 8, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)
oraNod pushed a commit that referenced this pull request Aug 8, 2024
* Update integration test guide docker flag usage

The integration guide linked to a file in the devel branch that gets out-of-sync with the actual supported images on the user's system.
Instead, we now instruct the user to run the help flag to get the list of supported images that are actually present on their system.

* Point users to the right section in ansible-test integration --help

(cherry picked from commit e2137b1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.15 Automatically create a backport for the stable-2.15 branch backport-2.16 Automatically create a backport for the stable-2.16 branch backport-2.17 Automatically create a backport for the stable-2.17 branch new_contributor This PR is the first contribution by a new community member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants