Skip to content

[CI] Mark kit-less tests with the kitless marker - #8609

Open
hujc7 wants to merge 9 commits into
isaac-sim:mainfrom
hujc7:jichuanh/ci-marker-selection
Open

hujc7 wants to merge 9 commits into
isaac-sim:mainfrom
hujc7:jichuanh/ci-marker-selection

Conversation

@hujc7

@hujc7 hujc7 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Mark the tests that pass without Isaac Sim as kitless, so a CI run or an external pipeline can select them with -m kitless (or CI_MARKER=kitless through tools/conftest.py).

Description

  • Adds pytest.mark.kitless to 66 test files in isaaclab_newton, isaaclab_ov and isaaclab_tasks; 79 files carry it after this change.
  • Test files only: no workflow, runner or library change.

Not complete yet. A run of every test file in the Kit-less image found about 257 more unmarked files that pass without Kit, mostly in isaaclab and isaaclab_tasks. They will be added here after a fresh run at this head, together with fixes for the marked files that do not pass cleanly there.

Type of change

  • New feature (non-breaking change which adds functionality)

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

hujc7 added 3 commits October 15, 2026 02:22
A workflow_dispatch input forwards one registered marker to every test job. A job with no marked file passes with an empty report, and an unregistered marker fails the job before selection.
@hujc7

hujc7 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added isaac-lab Related to Isaac Lab team infrastructure labels Oct 15, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 15, 2026
@hujc7

hujc7 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 15, 2026
@hujc7
hujc7 marked this pull request as ready for review October 15, 2026 21:45
@hujc7
hujc7 requested a review from a team October 15, 2026 21:45
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Adds pytest marker filtering to CI test runs.

The PR appears safe to merge, with non-blocking feedback to test the new session-start outcomes.

Findings

  1. P2 Marker outcomes remain untested ▶

Summary

Adds a manual marker input to select tests across the CI test jobs.

  • Manual CI runs can select test files by one pytest marker.
  • Kit starts without pytest’s marker filter in its arguments.

Acknowledged scope from hujc7: empty jobs still pull images and start containers; skipping that setup is deferred. performance-smoke intentionally ignores the marker.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Manual marker input] --> B[Each run-package-tests step]
    B --> C[CI_MARKER]
    C --> D{Registered marker?}
    D -->|No| E[Fail job]
    D -->|Yes| F[Apply job filters and marker scan]
    F --> G{Matching files?}
    G -->|No| H[Write empty report and pass]
    G -->|Yes| I[Run files with pytest marker]
    I --> J[Remove marker arguments before Kit starts]
Loading

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." · Reviewed by Greptile

Comment on lines +723 to +731
def test_ci_marker_must_be_a_registered_marker_name():
"""A marker run matches files by name, so an expression or a misspelling must not reach selection."""
orchestrator = _load_orchestrator_module()

registered = orchestrator._registered_markers(str(TOOLS_DIR.parent))

assert {"kitless", "arm_ci", "isaacsim_ci"} <= registered
assert "kitless and not rendering" not in registered
assert "kitles" not in registered

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Marker outcomes remain untested

The new test checks _registered_markers(), but never checks that pytest_sessionstart() rejects an invalid CI_MARKER. Removing that guard would leave this test passing. The new empty-selection branch also has no regression test.

Add session-start tests that assert an invalid marker exits with code 1 before selection, and a registered marker with no matching files writes an empty report and exits with code 0.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 44be631: replaced the parser test with two tests that call pytest_sessionstart directly. test_unregistered_ci_marker_fails_before_selection asserts exit code 1 before any file selection, for a misspelling and an expression; it fails when the guard is removed. test_registered_ci_marker_without_marked_files_passes_empty asserts exit code 0 and that the empty report is written.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

Needs attention: Design and architecture (1), Style consistency (1), Test quality (1). Other reviewed categories look good.

  • PR description: The body matches the diff and provides adequate linked CI measurements, but “registered-marker check” overstates validation because the added test never exercises rejection.
  • Design and architecture: Marker validation duplicates pytest’s resolved registry by reparsing pyproject.toml; use session.config.getini("markers") and remove _registered_markers.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Shadow Hand reverses the marker order used by sibling rendering files; place arm_ci before kitless for consistent module metadata.
  • Test quality: The new orchestrator test checks a private parser and copied marker inventory, not unregistered-CI_MARKER rejection; replace it with a boundary test of the failure path.

Minor fixes needed. Posted 3 inline findings.

Automated review; human maintainers own approval decisions.

assert orchestrator._resolve_startup_deadline("test_sample.py", timeout=10000, is_cold_cache_test=False) == 120


def test_ci_marker_must_be_a_registered_marker_name():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Test Quality — Test bypasses the added marker guard

This asserts a private parser against a copied marker inventory, and the two negative assertions can never hold a marker name. It passes even if the new unregistered-CI_MARKER rejection is deleted. Assert the rejection itself…

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 44be631: replaced the parser test with two tests that call pytest_sessionstart directly. test_unregistered_ci_marker_fails_before_selection asserts exit code 1 before any file selection, for a misspelling and an expression; it fails when the guard is removed. test_registered_ci_marker_without_marked_files_passes_empty asserts exit code 0 and that the empty report is written.

)

pytestmark = pytest.mark.arm_ci
pytestmark = [pytest.mark.kitless, pytest.mark.arm_ci]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Style Consistency — Marker order reversed versus siblings

The sibling rendering files changed here append the new marker last ([pytest.mark.arm_ci, pytest.mark.kitless]). Use the same order for consistency across the group.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 44be631: now [pytest.mark.arm_ci, pytest.mark.kitless], matching the sibling rendering files.

Comment thread tools/conftest.py Outdated
return grouped


def _registered_markers(workspace_root: str) -> set[str]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Design Architecture — Reuse pytest's resolved marker registry

_registered_markers re-parses pyproject.toml and hardcodes the [tool.pytest.ini_options] layout, duplicating configuration pytest already loads. Use session.config.getini("markers") in pytest_sessionstart and delete the helper.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 44be631: the guard now reads session.config.getini("markers") and _registered_markers is gone. The runner starts pytest from the repository root (.github/actions/run-tests/run_tests.sh), so the root pyproject.toml markers are the ones pytest loads.

hujc7 added 2 commits October 15, 2026 16:11
Read registered markers from pytest's loaded config instead of re-parsing pyproject.toml, test the rejection and empty-selection exits through pytest_sessionstart, and match the sibling marker order in the Shadow Hand rendering test.
@hujc7

hujc7 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 15, 2026
@ben-johnston-nv

ben-johnston-nv commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

For the follow-up in your description ("Jobs with nothing to run still pay image pull and setup"): I put up #8744, stacked on this PR.

Load Config applies the same test file selection as tools/conftest.py to each job's run-package-tests inputs. The selection now lives in a shared module, tools/test_selection.py. Jobs with no marked file are then skipped in their if: before they wait for a runner or pull the image. For kitless it keeps 9 of the 26 jobs, which matches job for job what ran and what passed empty in your run 38775752803.

On runners that pull the image slowly, each skipped job saves roughly 10 minutes. If it's easier, feel free to pull the commit into this PR instead.

hujc7 added 2 commits October 23, 2026 10:15
…selection

# Conflicts:
#	.github/workflows/build.yaml
#	source/isaaclab_ov/test/sensors/test_ray_caster.py
#	source/isaaclab_ov/test/test_ovrtx_compat.py
#	source/isaaclab_ov/test/test_ovstage_compat.py
#	source/isaaclab_ov/test/test_runtime_imports.py
@hujc7 hujc7 changed the title [CI] Select a whole CI run by pytest marker [CI] Mark kit-less tests with the kitless marker Oct 23, 2026
@hujc7

hujc7 commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 23, 2026

This branch has not been deployed

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

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants