Skip to content

test(e2e): report how long each run of a live HCL case takes - #14124

Merged
cv merged 3 commits into
v1from
test/hcl-live-run-timings
Nov 3, 2026
Merged

cv merged 3 commits into
v1from
test/hcl-live-run-timings

Conversation

@cv

@cv cv commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

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 The three-agent OpenShift live-kind test runs at its 150-second limit on linux_amd64 #14087 needs. Live / HCL and Live / Brev run only when dispatched and are not run here.

hcl_live::case now reads when each run block starts from OpenTofu's debug
log and prints a table of run names and seconds, plus the cleanup and the
total, on stderr and in the GitHub job summary. tofu test -json can't time
runs: OpenTofu 1.12.9 reports a file's runs only after the file ends, all
with one timestamp. The log is created owner-only, never printed, and
deleted once read or when the test panics.

Supersedes #14099, whose Rust flow #14097 moved to HCL. Part of #14087.

Co-authored-by: Krish Sapru <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
@cv

cv commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded pi coding agent 1.4.0 (session format v3), as a helper agent Session header; installed package version
Skills recorded nemoclaw-contributor-create-pr (complete read) Tool reads to cutoff
Instruction files recorded AGENTS.md (injected); WRITING.md, docs/contributing/testing.md, docs/contributing/live-tests.md, .github/PULL_REQUEST_TEMPLATE.md, .github/SESSION_REPORT_TEMPLATE.md (complete reads) Startup injection and tool reads to cutoff; the two contributing pages were read in several ranges
Tool calls recorded typescript: 68 Includes failed calls; the typescript wrapper hides its nested shell, git, and file calls
Session window recorded 2026-11-03T04:13Z to 2026-11-03T04:54Z; 41 min First event to cutoff before publishing, including idle time and live test runs
Compactions recorded 0 Complete record to cutoff
Models recorded nvidia-internal/azure/anthropic/claude-opus-5-5 Model change event; no later changes
Reasoning levels recorded medium Thinking level event; no later changes

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

sandl99 pushed a commit that referenced this pull request Nov 3, 2026
…14126)

## Failure

Live / Kind on `linux_amd64` fails its 150 s per-test limit. Since
#14097 moved the three-agent OpenShift test to the
`kind-openshift-agents` HCL case, `hcl_live::case` took 130.1–143.3 s on
`linux_amd64` in four runs, then 163.3 s and 155.6 s on #14124. In both
#14124 attempts the other Kubernetes tests, which #14124 doesn't touch,
were 10–15% slower too, so the runners vary more than the limit allows.
#14087 is finding where that time goes.

## Decision

Raise the Live / Kind per-test limit from 150 s to 180 s, with the
`live-kind` profile's slow-timeout to match, and its wall limit from 270
s to 300 s. This is temporary: the comment in
`.config/test-budgets.yaml` records the numbers and says to return to
150 s and 270 s when #14087 is resolved. Part of #14087; it doesn't
close it.

## Validation

- `cargo test -p nemoclaw-build` passed, including the check that the
profile's slow-timeout matches the budget.
- `cargo ci` passed: format, clippy, build, tests, schema, bundle, and
lifecycle (100 tests).
- Deferred to CI: Live / Kind on both platforms, which this changes only
the limits of.

Signed-off-by: Carlos Villela <[email protected]>
The per-run timing table never reached a CI job summary. OpenTofu formats
core log timestamps with Go's Z0700 layout, so a UTC host such as a GitHub
runner writes 2026-11-03T08:47:40.561Z rather than a numeric offset.
run_durations parsed only numeric offsets, skipped every line, and
report_timings printed only "OpenTofu's log times no run", which nextest
hides for a passing test. The unit tests and the local run used -0700.

Read a trailing Z as +0000 before parsing.

Validation: the new run_durations_read_utc_timestamps test, built from
lines OpenTofu 1.12.9 wrote with TZ=UTC, failed with an empty result
before the change and passes after it; the hcl_live unit tests,
cargo fmt --check, and cargo clippy -p nemoclaw-e2e --all-targets
-D warnings pass. The Live / Kind summary on this push is the end-to-end
check.
@cv
cv merged commit 57395fe into v1 Nov 3, 2026
54 checks passed
@cv
cv deleted the test/hcl-live-run-timings branch November 3, 2026 09:33
sandl99 added a commit that referenced this pull request Nov 3, 2026
Keep the kind case's registry and OIDC migration over v1's Rust registry
and OIDC tests and their helpers, keep #14124's per-run timing report
beside the issuer probe in hcl_live.rs, keep #14126's raised Live / Kind
limits, and state them in the testing guide's budget table.
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch labels Nov 3, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 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: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure area: observability Logging, metrics, tracing, diagnostics, or debug output area: security Security controls, permissions, secrets, or hardening 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