Skip to content

test(e2e): report the phases of the Live / Kind deployment flow - #14099

Closed
ksapru wants to merge 1 commit into
NVIDIA:v1from
ksapru:ci/14087-live-kind-phase-timings
Closed

ksapru wants to merge 1 commit into
NVIDIA:v1from
ksapru:ci/14087-live-kind-phase-timings

Conversation

@ksapru

@ksapru ksapru commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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 on linux_arm64 with the test and its kind node limited to 4 CPUs, and its linux_amd64 figure 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 on linux_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_amd64 run 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-kind sets store-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 --check passes.
  • cargo clippy -p nemoclaw-e2e --all-targets -- -D warnings passes.
  • cargo test -p nemoclaw-e2e --test e2e -- phase_tables fabric_messages passes, including the new test of the phase table.
  • Not run locally: the Live / Kind suite, which needs native Linux with kind. I have not yet seen the new table in CI; the Live / Kind jobs on this PR should show it for each platform they run on once the PR is vetted.
  • Not run locally: the workspace tests. The change only touches this test file, so I left them to CI.

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.
@copy-pr-bot

copy-pr-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ksapru

ksapru commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Claude Code 2.1.308 Session metadata.
Skills recorded nemoclaw-contributor-implement-issue (injected); nemoclaw-contributor-create-pr (injected) Skill tool results to the cutoff.
Instruction files recorded CLAUDE.md (injected); WRITING.md (complete read); PULL_REQUEST_TEMPLATE.md (complete read); SESSION_REPORT_TEMPLATE.md (complete read) Truncated reads are not counted: AGENTS.md was not read, and the v1 create-pr SKILL.md was read only to line 60.
Tool calls recorded Claude Code tool calls: 68 (Bash: 46, Edit: 11, Read: 5, Skill: 2, TaskStop: 2, list_sessions: 1, Write: 1) Attempted calls, including failures, from the first request about #14087. This session is a fork; the parent's earlier calls are excluded. No nested calls observed.
Session window recorded 2026-11-02T17:07Z to 2026-11-02T17:40Z; 34 min First request about #14087 to the cutoff, including idle time. Earlier history is inherited from the parent session.
Compactions recorded 0 Record after the fork point, to the cutoff.
Models recorded claude-sonnet-5-5 Assistant turns after the fork point; no changes.
Reasoning levels unavailable - The session record has no reasoning-level entries to the cutoff.

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: observability Logging, metrics, tracing, diagnostics, or debug output chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch labels Nov 2, 2026
@cv

cv commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

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 kubernetes_live.rs to the kind-openshift-agents HCL E2E case, which tofu test runs. That removed the Rust flow this pull request instruments, so it no longer applies and conflicts with v1.

#14124 brings the same table to the HCL cases and supersedes this pull request. It times each run block of every live HCL case, and you're a co-author on its commit. A local linux_arm64 run already shows where the time goes: 32.6 s to apply, 38.9 s to destroy, and 12.3 s of cleanup out of 97.0 s. Your review there would be welcome, and once it merges this one can be closed.

cv added a commit that referenced this pull request Nov 3, 2026
## 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]>
@ksapru

ksapru commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Ack, closing.

@ksapru ksapru closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: observability Logging, metrics, tracing, diagnostics, or debug output chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants