Repository navigation
Reduce CI Log Verbosity and Improve Failure Visibility - #6462
mataylor-nvidia merged 32 commits into
Conversation
Greptile SummaryThis PR reduces CI log verbosity by converting diagnostic
Confidence Score: 5/5Safe to merge; the CI workflow refactoring is well-structured and all existing upload call sites have corresponding upload-junit-results steps. The consolidation of artifact upload logic into the new reusable action is clean and all three calling contexts have been updated consistently. The logging refactor uses appropriate levels throughout. The two new findings are both minor: a redundant flag in the subprocess command and a missing guard that only affects future callers. tools/conftest.py (redundant --show-capture=all with -s) and .github/actions/upload-junit-results/action.yml (missing artifact-name guard for comparison images) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI Job] --> B[run-tests / install-ci-run]
B --> C[Test execution]
C --> D{Tests pass?}
D -->|yes| E[JUnit XML written]
D -->|no| E
E --> F[upload-junit-results action]
F --> G[Upload comparison images if path provided]
F --> H[Upload JUnit XML artifact]
F --> I[upload-omni-github-test-results]
H --> J[artifact-url output]
J --> I
G --> K[comparison-images-url output]
K --> I
I --> L[Convert JUnit to omni-github format]
L --> M[Schema validate]
M --> N[Upload omni-github artifact]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[CI Job] --> B[run-tests / install-ci-run]
B --> C[Test execution]
C --> D{Tests pass?}
D -->|yes| E[JUnit XML written]
D -->|no| E
E --> F[upload-junit-results action]
F --> G[Upload comparison images if path provided]
F --> H[Upload JUnit XML artifact]
F --> I[upload-omni-github-test-results]
H --> J[artifact-url output]
J --> I
G --> K[comparison-images-url output]
K --> I
I --> L[Convert JUnit to omni-github format]
L --> M[Schema validate]
M --> N[Upload omni-github artifact]
Reviews (8): Last reviewed commit: "update" | Re-trigger Greptile |
|
|
||
| """ | ||
| # prepare the managers | ||
| # -- event manager (we print it here to make the logging consistent) |
There was a problem hiding this comment.
print vs logger usage could effect how verbose the logs are
comment says print it here to make the logging consistent, but I do not see print used elsewhere besides scripts
Set CARB_LOG_LEVEL=Warn in Docker env so Isaac Sim initialization messages no longer flood CI logs. Remove -v from the outer pytest invocation inside the container (verbose item headers add no value when conftest.py owns the run and summary). Add logging.basicConfig so the conftest logger.info() progress messages reliably appear instead of being silently dropped by Python's default WARNING filter.
…ia/IsaacLab into mataylor/improve-loglevels
Add --log-level=WARNING to all pytest invocations so that verbose logger.info() calls (e.g. Simulation Joint Information tables from articulation init) are suppressed during normal CI runs. Also switch --show-capture=all to --show-capture=failed so captured output sections only appear for failing tests.
Signed-off-by: Matthew Taylor <[email protected]>
| [tool.pytest.ini_options] | ||
|
|
||
| log_level = "WARNING" | ||
| log_file_level = "INFO" |
There was a problem hiding this comment.
log file should have full traceback for download
…ia/IsaacLab into mataylor/improve-loglevels
Remove yml changes that crept in from earlier CI work and partial reverts. The only intended changes in this PR are Python/conftest logging improvements.
| if os.environ.get("ISAACLAB_TEST_QUEUE"): | ||
| test_files = list(test_status) | ||
|
|
||
| print("failed tests:", failed_tests) |
There was a problem hiding this comment.
todo: I think failed tests should be an error?
There was a problem hiding this comment.
yes, I was thinking this however is it a test error or an error of the manager
There was a problem hiding this comment.
I think the errors of the manager world be unable to run tests, ....
| sys.executable, | ||
| "-m", | ||
| "pytest", | ||
| "-s", |
There was a problem hiding this comment.
question (non-blocking): if there is no capture how does the new flag work --show-capture=all if the main change is to remove this flag which is --capture=no?
There was a problem hiding this comment.
--capture=no (or -s) disables capturing entirely. stdout/stderr stream directly to the terminal in real-time, nothing is buffered.
--show-capture=all keeps capturing on (default fd mode buffers everything), but when a test fails, pytest dumps all captured stdout, stderr, and logs into the failure report
i.e. only dump the capture on failure
# Description CI output is noticeably less verbose for normal successful setup and initialization paths Failure logs preserve the important debugging details for failed tests The end of the CI log includes a clear summary of failed tests Logs from tasks/core are easier to navigate and no longer dominated by scene/task init noise Engineers can identify the failing test and its main error from the log without excessive scrolling Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (OMPE-100763) ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Signed-off-by: Matthew Taylor <[email protected]>
# Description Fixes large blocks of NUL bytes being written to CI logs during kitless rendering tests, at the source. The kitless rendering tests overrode `OVRTXRendererCfg.log_file_path` to `/dev/stdout` (`CON` on Windows), added in #5749 so the RTX shader-compilation timeline would be visible while a test appeared to hang. OVRTX opens that path natively and, running with `keep_system_alive=True`, retains the handle for the lifetime of the process. Under pytest's file-descriptor capture, fd 1 is a temporary file that pytest rewinds and truncates between tests, so the retained handle keeps writing at a stale offset and the resulting sparse gap is read back as a block of NUL bytes. This drops the override entirely rather than working around it. `log_file_path` already defaults to `<system temp>/ovrtx_renderer.log`, so `_redirect_ovrtx_renderer_log_to_stdout()` only ever moved the log somewhere less safe — and its hardcoded camera-name list (`tiled_camera`, `base_camera`, `wrist_camera`) silently missed any camera named otherwise. To keep the log visible, an autouse fixture in `source/isaaclab_tasks/test/conftest.py` replays the bytes each test appends. It is a no-op for tests that never build an OVRTX renderer, records only the byte range written during the test, and replays from the beginning when the 64 bytes in front of that range changed — the log was truncated and rewritten, by OVRTX opening one an earlier pytest process left behind, say. Net effect: 48 lines deleted, 36 added, and no test-owned file descriptor competing with pytest for stdout. ## Alternative considered Running the child pytest with `--capture=sys` (#7031) avoids the sparse-file mechanism, but breaks `SimulationApp.__init__`, which calls `faulthandler.enable()` — that needs a real fd, and under `sys` capture `sys.stderr` is a `CaptureIO` with no `fileno()`. It also sends every native fd-1/fd-2 write and all subprocess output from passing tests straight to the job log, reversing #6462. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots Failure output with the fixture in place: ``` --------------------------- Captured stdout teardown --------------------------- ----- OVRTX renderer log: test_failing_ovrtx_test ----- [omni.rtx] BOOM ``` ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Description
CI output is noticeably less verbose for normal successful setup and initialization paths
Failure logs preserve the important debugging details for failed tests
The end of the CI log includes a clear summary of failed tests
Logs from tasks/core are easier to navigate and no longer dominated by scene/task init noise
Engineers can identify the failing test and its main error from the log without excessive scrolling
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes # (OMPE-100763)
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there