Skip to content

tests: run heavy integration tests in manually triggered per-backend workflows - #13165

Open
russoz wants to merge 2 commits into
ansible-collections:mainfrom
russoz-ansible:heavy-tests-gha
Open

russoz wants to merge 2 commits into
ansible-collections:mainfrom
russoz-ansible:heavy-tests-gha

Conversation

@russoz

@russoz russoz commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator
SUMMARY

Follow-up to #12985. Heavy integration targets are grouped by the backend service they need, so that each backend can be tested on its own in GitHub Actions:

  • heavy targets use a heavy/<backend> alias instead of heavy (rundeck now has heavy/rundeck); heavy/ still selects all of them;
  • each backend has its own session in antsibull-nox.toml, tagged heavy-<backend>, replacing the session in noxfile.py; nox -Re ansible-test-integration-heavy still runs all of them;
  • each backend has its own manually triggered workflow, nox-heavy-<backend>, starting with nox-heavy-rundeck; the regular nox workflow excludes the heavy tag;
  • the aliases extra sanity check fails when a heavy/<backend> alias has no tagged session or no workflow.

GitLab (#13005) is meant to be added as another backend.

AI (Claude) was used to assist with this contribution.

ISSUE TYPE
  • Test Pull Request
COMPONENT NAME

.github/workflows/nox-heavy-rundeck.yml
.github/workflows/nox.yml
antsibull-nox.toml
noxfile.py
tests/sanity/extra/aliases.py
tests/integration/targets/rundeck

ADDITIONAL INFORMATION

A workflow_dispatch trigger only becomes available once the workflow is in the default branch.
nox-heavy-rundeck was run in this PR with a temporary pull_request trigger, since removed: https://github.com/ansible-collections/community.general/actions/runs/41141268833

🤖 Generated with Claude Code

Tag heavy targets with `heavy/<backend>` aliases, define one session per
backend in antsibull-nox.toml, and add a manually triggered
nox-heavy-rundeck workflow. The aliases extra sanity check now requires
every heavy backend to have a tagged session and its own workflow.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ansibullbot ansibullbot added WIP Work in progress integration tests/integration tests tests labels Oct 30, 2026
@russoz russoz changed the title [WIP] tests: run heavy integration tests in manually triggered per-backend workflows tests: run heavy integration tests in manually triggered per-backend workflows Oct 30, 2026
@russoz
russoz marked this pull request as ready for review October 30, 2026 23:27
@ansibullbot ansibullbot removed the WIP Work in progress label Oct 30, 2026
Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ansibullbot ansibullbot 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 and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Oct 30, 2026
@ansibullbot

Copy link
Copy Markdown
Collaborator

Failures in nox session typing, part mypy:

tests/sanity/extra/aliases.py:18:1: [import-not-found] Cannot find implementation or library stub for module named "tomli"
                                                       See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
tests/sanity/extra/aliases.py:18:5: [no-redef] Name "tomllib" already defined (by an import)

click here for bot help

@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Oct 31, 2026
@felixfontein felixfontein added the backport-13 Automatically create a backport for the stable-13 branch label Oct 31, 2026

@felixfontein felixfontein left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks again for working on this!

Comment on lines +15 to +18
try:
import tomllib
except ImportError:
import tomli as tomllib

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since tomllib has been around since Python 3.11, let's remove the try and tomli fallback. This will also fix the mypy errors.

import tomli as tomllib


def get_heavy_targets():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def get_heavy_targets():
def get_heavy_targets() -> tuple[set[str], bool]:

return targets, has_errors


def main():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also try to see whether this "just works". If not, I can fix it in a follow-up.

Suggested change
def main():
def main() -> None:

Comment thread antsibull-nox.toml Resolved
Comment thread CONTRIBUTING.md
```

Additional options for `ansible-test` can be passed after `--`.
Each backend also has its own GitHub workflow, `nox-heavy-<backend>`, that must be triggered manually.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could also try to have a single workflow, where you have to select from a dropdown which backend to use. That would avoid having to add more of these files in the future. I can work on that in a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-13 Automatically create a backport for the stable-13 branch ci_verified Push fixes to PR branch to re-run CI integration tests/integration needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR tests tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants