Skip to content

docs: add e2e-overnight-run skill for full runtime x OS validation - #1041

Merged
seant-aws merged 1 commit into
aws-deadline:mainlinefrom
seant-aws:e2e-overnight-skill
Aug 7, 2026
Merged

docs: add e2e-overnight-run skill for full runtime x OS validation#1041
seant-aws merged 1 commit into
aws-deadline:mainlinefrom
seant-aws:e2e-overnight-skill

Conversation

@seant-aws

Copy link
Copy Markdown
Contributor

What was the problem/requirement? (What/Why)

Validating a worker-agent release candidate means running the E2E suite across all four runtime x OS combinations (Linux/Windows x Python/Rust session runtimes). Done by hand this is four long, error-prone runs with several easy-to-miss traps (wrong wheel silently tested, stale test-fixtures env, distinguishing infra flakes from real failures).

What was the solution? (How)

Add an e2e-overnight-run skill under skills/:

  • overnight_e2e.sh — single entry point. Validates prerequisites (worktree, credentials, infra scripts, tools) and aborts before provisioning if any are missing; builds the wheel under test and exports WORKER_AGENT_WHL_PATH; rebuilds the e2e env; verifies the test-fixtures expose session_runtime; launches a detached tmux supervisor.
  • _supervise.sh — runs each variant sequentially (never two farms concurrently), retries once on failure, writes a SUMMARY.md results table with per-attempt pytest banners.
  • e2e-constraints.txt.example — template for the optional --constraints file on hosts lacking a pre-built wheel for a test dependency.

Complements the existing worker-agent-testing skill (which documents the one-off E2E setup) by automating the full validation matrix.

What is the impact of this change?

Docs/tooling only. No product code touched. Gives a repeatable, one-command way to validate both session runtimes on both OSes.

How was this change tested?

  • bash -n on both scripts; --help and fail-loud prerequisite validation exercised manually.
  • The workflow it encodes was used to run the full four-variant matrix during session-runtime release validation.

Was this change documented?

Yes — the skill's SKILL.md is the runbook.

Is this a breaking change?

No.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Aug 7, 2026
cd "$REPO"

variant_infra() { case "$1" in linux-*) echo ".e2e_linux_infra.sh";; windows-*) echo ".e2e_windows_infra.sh";; esac; }
variant_script() { case "$1" in *-python) echo "test";; *-rust) echo "test-rust";; esac; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *-rust variants map to hatch run e2e:test-rust, but no test-rust script exists in hatch.toml — the only script defined under [envs.e2e.scripts] is test (hatch.toml:48). This command will fail immediately with a hatch "unknown script" error, so both rust variants can never run and will be recorded as failures (then retried and failed again).

Looking at how rust is actually exercised in the suite: test/e2e/test_session_runtime.py selects the runtime via the explicit_runtime_worker fixture parametrized over python/rust (and service-selected), driven by DeadlineWorkerConfiguration.session_runtime on a per-worker basis. There is no whole-suite rust pin, no --session-runtime pytest option, and no WORKER_AGENT_SESSION_RUNTIME env var in the repo — so the SKILL.md "Runtime selection reference" table describing e2e:test-rust, --session-runtime, and WORKER_AGENT_SESSION_RUNTIME does not match the actual test harness. As written, linux-rust/windows-rust would run the identical test command as the python variants (once test-rust is fixed), or fail outright (as-is). Please reconcile the supervisor and SKILL.md with the real mechanism.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry claude, the #1040 hasnt merged yet so you cant see the test script

@seant-aws
seant-aws marked this pull request as ready for review August 7, 2026 17:51
@seant-aws
seant-aws requested a review from a team as a code owner August 7, 2026 17:51
Add a skill that runs the test/e2e suite across all four
runtime x OS variants (Linux/Windows x Python/Rust session
runtimes) unattended, for release validation.

overnight_e2e.sh validates prerequisites, builds the wheel under
test, rebuilds the e2e env, verifies the test-fixtures expose the
session_runtime field, and launches a detached tmux supervisor.
_supervise.sh runs each variant sequentially with a single retry
and writes a SUMMARY.md results table. Includes a constraints-file
template for hosts lacking pre-built wheels for a test dependency.

Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com>
@seant-aws
seant-aws force-pushed the e2e-overnight-skill branch from 0180e30 to 8efcee9 Compare August 7, 2026 18:15
env -u TMUX tmux kill-session -t "$TMUX_SESSION" 2>/dev/null || true
env -u TMUX tmux new-session -d -s "$TMUX_SESSION" -x 220 -y 50
env -u TMUX tmux send-keys -t "$TMUX_SESSION" \
"REPO='$REPO' REGION='$REGION' VARIANTS='$VARIANTS' PIP_CONSTRAINT='${CONSTRAINTS}' WORKER_AGENT_WHL_PATH='$WHL' bash '$SCRIPT_DIR/_supervise.sh' 2>&1 | tee '$OUTDIR/supervisor.log'" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supervisor is launched via tmux send-keys into a session on the tmux server, and a child session inherits the server’s environment — not this shell’s — for anything outside tmux’s update-environment list (which is DISPLAY/SSH_* only; AWS_* are not on it). This script explicitly forwards REPO/REGION/VARIANTS/PIP_CONSTRAINT/WORKER_AGENT_WHL_PATH on the send-keys line, but not the AWS credentials it just validated.

Consequences for the common credential setups the SKILL lists:

  • AWS_PROFILE / env-var STS creds (AWS_ACCESS_KEY_ID / AWS_SESSION_TOKEN, SSO): overnight_e2e.sh validates them with aws sts get-caller-identity in its own shell (line 95) and passes, but if a tmux server is already running (e.g. you are inside tmux, or ran this before), the new session gets that pre-existing server’s stale/empty AWS environment. The 6–8h unattended run then authenticates against the wrong account — or fails get-caller-identity in run_one and burns both attempts of every variant on an auth error, despite the up-front check having succeeded.
  • Only the fresh-server case (no tmux server yet) inherits the current env correctly, so this fails intermittently based on prior tmux state — the worst kind of unattended-run flake.

Fix: forward the credential env explicitly on the send-keys line the same way REGION is (e.g. AWS_PROFILE='$AWS_PROFILE' AWS_ACCESS_KEY_ID=... AWS_SESSION_TOKEN=...), or set them in the session via tmux setenv before send-keys. At minimum, document that credentials must be present in the tmux server environment.

@seant-aws
seant-aws merged commit d750646 into aws-deadline:mainline Aug 7, 2026
32 checks passed
@godobyte

godobyte commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

I wonder whether this could be merged with existing testing skill.
https://github.com/seant-aws/deadline-cloud-worker-agent/blob/mainline/skills/worker-agent-testing/SKILL.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants