Repository navigation
Conversation
The three-agent OpenShift test runs at about its 150 s limit on linux_amd64, but CI keeps only each test's total time, so nothing shows which phase is slow. Record how long each phase of the shared deployment flow takes: the first apply, the unchanged apply, the export, the apply of the export, both request rounds, destroy, and the wait for the Sandbox objects to go. Print them as a table and add it to the job summary. The table holds phase names and seconds only; nothing from the deployment is printed. Part of NVIDIA#14087.
Authoring session — opening
|
|
Thank you, @ksapru. This measurement is what #14087 was missing, and your design of a table of names and seconds only, on stderr and in the job summary in one write, carries over unchanged. #14097 merged after you opened this and moved the three-agent OpenShift test from #14124 brings the same table to the HCL cases and supersedes this pull request. It times each |
## Failure The three-agent OpenShift Live / Kind test runs near its time limit on `linux_amd64` (#14087), and CI shows no breakdown of where it spends that time: nextest shows nothing of a passing test, and the JUnit report keeps no passing output. #14099 added a per-phase table to the Rust flow, but #14097 moved that test to the `kind-openshift-agents` HCL E2E case, which `hcl_live::case` runs through `tofu test`, and removed the flow #14099 instrumented. ## Decision Part of #14087; it doesn't make the test faster. This supersedes #14099, which no longer applies after #14097, and keeps its design: a table of names and seconds only, on stderr and appended to `GITHUB_STEP_SUMMARY` in one write so concurrent tests don't interleave. The idea and the reporting design are #14099's; Krish Sapru is a co-author. After `tofu test` ends, pass or fail, `hcl_live::case` prints each run block's seconds, the cleanup in which `tofu test` destroys the runs' state, and the total. It covers every live HCL case, since they all run through `hcl_live::case`: `kind-openshift-agents` in Live / Kind, `docker-dummy` in Live / Docker, and the Live / HCL and Live / Brev cases (Brev has no job summary there, so only stderr). The times come from OpenTofu's debug log, not `tofu test -json`. With the pinned OpenTofu 1.12.9, the JSON view reports a file's runs only after the whole file ends, all with one timestamp; I checked this with a two-run test whose runs sleep 2 s and 3 s, which both reported at the same instant 5 s in. The `TestFileRunner: starting validate for FILE/RUN` lines that `TF_LOG_CORE=debug` writes mark each run's start; a run lasts until the next run or the cleanup starts. `info` level has no such lines. That log can hold provider configuration and plan values, so: - the test creates it empty and owner-only (`0600`, which OpenTofu keeps when it appends) in the run's private `work` directory, replacing any log a killed run left; - only the start lines' timestamps and run names are read; the log is never printed; - it is deleted as soon as `tofu test` exits, by a drop guard that also runs when the test panics; only a process killed outright, such as by nextest's timeout, leaves it, inside the run directory that `cargo ci live-kind` and `live-docker` delete with their temporary inputs; - no CI upload includes it: Live / Docker and Live / Kind upload only their JUnit XML, Live / HCL uploads `hcl/reports/*.json`, and Live / Brev `brev-evidence/*.json`. Only the test's own `tofu` gets `TF_LOG_CORE` and `TF_LOG_PATH`; the CLI it starts inherits them, but the SDK drops every `TF_` variable from the OpenTofu it runs. The test's steps, assertions, and time limits don't change. ## Validation - The new unit tests (`hcl_live::run_durations_*`, `timing_tables_*`, and `the_core_log_is_owner_only_and_removed_once_read_or_dropped`) failed against stubs, then passed. - `cargo ci` (bundle and lifecycle selected) passed before and after the commit; I ran it as `cargo run --locked --quiet --target-dir target/ci-runner -p nemoclaw-build --no-default-features -- ci`, because the `cargo ci` alias fails here with Cargo 1.99.1 (`unexpected argument '--locked'`). - `cargo ci live-kind` passed twice on `linux_arm64`; its cluster was deleted. The second run, with `GITHUB_STEP_SUMMARY` set to a local file, appended this table, next to `cargo ci`'s own summary, which gives `hcl_live::case` 97.1 s: #### Runs of the kind-openshift-agents case: 97.0 s | Run | Time | |---|---| | cluster | 6.5 s | | apply | 32.6 s | | reply | 3.4 s | | unchanged_plan | 3.2 s | | destroy | 38.9 s | | (cleanup) | 12.3 s | No `tofu-test.log` remained on the host afterward. - `cargo run --locked -p nemoclaw-build -- fern check` passed, with Node 25.9.0 rather than the pinned 24.22.1. - Deferred to CI: `cargo ci live-docker` (the `docker-dummy` case) and the `linux_amd64` Live / Kind run, which is the measurement #14087 needs. Live / HCL and Live / Brev run only when dispatched and are not run here. --------- Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: Krish Sapru <[email protected]> Co-authored-by: San Dang <[email protected]>
|
Ack, closing. |
Failure
The three-agent OpenShift Live / Kind test runs at about its 150 s limit on
linux_amd64(#14087: 151.1 s and 151.1 s failed, 145.3 s passed). The phase breakdown in the issue was measured onlinux_arm64with the test and its kind node limited to 4 CPUs, and itslinux_amd64figure is an estimate. CI keeps only each test's total time, and nextest shows nothing for a passing test, so no CI output shows which phase is slow onlinux_amd64.Decision
Part of #14087. This does not make the test faster. The issue's analysis found no NemoClaw-side change with reliable margin; the remaining fixes are in OpenShell (ai-openshell/openshell#5025) and in Fabric and OpenClaw.
This PR adds the missing measurement. The shared deployment flow records how long each phase takes and adds a table of phase names and seconds to the job summary, so a
linux_amd64run can confirm or correct the estimate. The phases are the first apply (with the caller's hook), the unchanged apply, the export, the apply of the export, both request rounds, destroy, and the wait for the Sandbox objects to go. They are coarser than the issue's breakdown: the first apply is one row. The registry test uses the same flow and reports its phases too.The table holds phase names and seconds only. I did not store passing-test output in the JUnit report:
live-kindsetsstore-failure-output = false, and raw test output can contain deployment values. The flow's steps, assertions, and time limits do not change.If the table is not wanted once the OpenShell fix lands, removing it is one struct and its marks in
deploy_image_and_export.Validation
cargo fmt --checkpasses.cargo clippy -p nemoclaw-e2e --all-targets -- -D warningspasses.cargo test -p nemoclaw-e2e --test e2e -- phase_tables fabric_messagespasses, including the new test of the phase table.