Repository navigation
test(e2e): report how long each run of a live HCL case takes - #14124
Merged
Merged
Conversation
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]>
Collaborator
Author
Authoring session — opening
|
Contributor
This was referenced Nov 3, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thekind-openshift-agentsHCL E2E case, whichhcl_live::caseruns throughtofu 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_SUMMARYin 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 testends, pass or fail,hcl_live::caseprints each run block's seconds, the cleanup in whichtofu testdestroys the runs' state, and the total. It covers every live HCL case, since they all run throughhcl_live::case:kind-openshift-agentsin Live / Kind,docker-dummyin 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. TheTestFileRunner: starting validate for FILE/RUNlines thatTF_LOG_CORE=debugwrites mark each run's start; a run lasts until the next run or the cleanup starts.infolevel has no such lines.That log can hold provider configuration and plan values, so:
0600, which OpenTofu keeps when it appends) in the run's privateworkdirectory, replacing any log a killed run left;tofu testexits, 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 thatcargo ci live-kindandlive-dockerdelete with their temporary inputs;hcl/reports/*.json, and Live / Brevbrev-evidence/*.json.Only the test's own
tofugetsTF_LOG_COREandTF_LOG_PATH; the CLI it starts inherits them, but the SDK drops everyTF_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_*, andthe_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 ascargo run --locked --quiet --target-dir target/ci-runner -p nemoclaw-build --no-default-features -- ci, because thecargo cialias fails here with Cargo 1.99.1 (unexpected argument '--locked').cargo ci live-kindpassed twice onlinux_arm64; its cluster was deleted. The second run, withGITHUB_STEP_SUMMARYset to a local file, appended this table, next tocargo ci's own summary, which giveshcl_live::case97.1 s:Runs of the kind-openshift-agents case: 97.0 s
No
tofu-test.logremained on the host afterward.cargo run --locked -p nemoclaw-build -- fern checkpassed, with Node 25.9.0 rather than the pinned 24.22.1.Deferred to CI:
cargo ci live-docker(thedocker-dummycase) and thelinux_amd64Live / 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.