fix(tests): run create_cluster in a timeout-able bash in e2e-journey#316
Merged
Merged
Conversation
The guard() watchdog added in #310/#311 wraps steps in `timeout`, which execs an external command in a fresh process and cannot see shell functions. create_cluster is a function sourced from cluster.sh, so `guard 600 "create_cluster" -- create_cluster` failed with "timeout: failed to run command 'create_cluster': No such file or directory" (exit 127) before the cluster was ever created — failing the E2E last-mile journey job. Run create_cluster inside a real `bash` (which timeout CAN exec) that re-sources the libs. Exported CLUSTER_NAME / TRACEBLOC_NO_AUTOSTART / USER carry through the env, and the CLI binaries install_* dropped into /usr/local/bin are on the inherited PATH. Refs #310 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
divyasinghds
approved these changes
Jul 7, 2026
This was referenced Jul 7, 2026
Closed
saadqbal
added a commit
that referenced
this pull request
Jul 7, 2026
… --dry-run (#318) Step 4 only ran for real once #316 fixed the create_cluster exit-127 regression (the old vacuous guard() and then the step-1 crash had hidden it). It failed with "table name is required (set --table)". `dataset push --dry-run` is no longer an offline check: the current CLI runs cluster discovery AND a Bound-PVC check (resolveClusterTarget with needPVC=true) before its dry-run stop, and this harness's credential-free stub creates no PVC — so that path can't pass here regardless of flags. Switch to `tracebloc data validate <spec>`, the CLI's purpose-built offline schema check (validates against the embedded ingest.v1.json, no cluster) — exactly the "offline-validatable, no creds, no reachable platform" smoke the step was always meant to be. Assert both directions (valid spec passes, invalid spec rejected) so a green run isn't vacuous, mirroring the guard() self-test. Spec shape matches the CLI's own known-good fixture (testdata/smoke/valid-image-classification.yaml). Verified against the real released binary (tracebloc/cli v0.6.0, which releases/latest resolves to): valid -> exit 0, missing-intent -> exit 2. Closes #317. Follow-up to #316 / #310. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
scripts/tests/e2e-journey.shstep 1 failed ondevelopwith:The
guard()watchdog added in #310/#311 wraps each step intimeout.timeoutexecs an external command in a fresh process and cannot see shell functions — andcreate_clusteris a function sourced fromscripts/lib/cluster.sh. So the very first guarded step aborted before the cluster was ever created, failing the E2E last-mile journey (amd64) check (e.g. on #309).Fix
Run
create_clusterinside a realbash(whichtimeoutcan exec) that re-sources the libs:CLUSTER_NAME/TRACEBLOC_NO_AUTOSTART/USERcarry through the env.install_*dropped into/usr/local/binare on the inherited PATH.guard()negative-control self-test still validates the timeout mechanics (it guardssh -c 'exit 7', a real binary).Verified locally: script parses (
bash -n) andcreate_clusterresolves inside the re-sourcing subshell.Refs #310
🤖 Generated with Claude Code
Note
Low Risk
Test harness-only change; no production installer or cluster logic modified.
Overview
Fixes E2E last-mile journey step 1 failing immediately with
timeout: failed to run command 'create_cluster'(exit 127) after theguard()watchdog started wrapping steps in GNUtimeout.guardpasses its command totimeout, which only runs real executables—not shell functions likecreate_clusterfromcluster.sh. Step 1 now runsbash -cthat re-sourcescommon.sh,setup-linux.sh, andcluster.sh, then callscreate_cluster, with$LIBpassed as_so sourcing still works undertimeout.Exported env (
CLUSTER_NAME,TRACEBLOC_NO_AUTOSTART,USER) and PATH from priorinstall_*steps are unchanged; inline comments document why the indirection is required. Other guarded steps already use binaries (kubectl,curl,sh, etc.) and are unaffected.Reviewed by Cursor Bugbot for commit 528d8d4. Bugbot is set up for automated code reviews on this repo. Configure here.