Repository navigation
Conversation
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.
|
run-ci |
|
run-ci |
[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
SummaryAdds a manual
Acknowledged scope from 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]
Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'upstream/d..." · Reviewed by Greptile |
| 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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(): |
There was a problem hiding this comment.
🟡 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…
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
🟡 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.
There was a problem hiding this comment.
Fixed in 44be631: now [pytest.mark.arm_ci, pytest.mark.kitless], matching the sibling rendering files.
| return grouped | ||
|
|
||
|
|
||
| def _registered_markers(workspace_root: str) -> set[str]: |
There was a problem hiding this comment.
🟡 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.
There was a problem hiding this comment.
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.
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.
|
run-ci |
|
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 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. |
…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
|
run-ci |
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(orCI_MARKER=kitlessthroughtools/conftest.py).Description
pytest.mark.kitlessto 66 test files inisaaclab_newton,isaaclab_ovandisaaclab_tasks; 79 files carry it after this 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
isaaclabandisaaclab_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
Release backport
developChecklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there