Conversation
The Wait for SSH step and the two Docker daemon waits in setup-nitro-instance.sh fell through after their last attempt, so the job failed in a later step. Each loop now records success and fails with an error when every attempt has failed.
5 of 6 tasks
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The timeout handling is correct, scoped, and preserves existing retry behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Ensures EIF CI fails immediately when SSH or Docker readiness probes time out.
Changes:
- Track successful SSH and Docker probes.
- Exit with explicit errors after exhausting retries.
| File | Description |
|---|---|
.github/workflows/eif-build.yml |
Fails the job when SSH never becomes ready. |
enclave/scripts/setup-nitro-instance.sh |
Fails setup when Docker remains unavailable. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
.github/workflows/eif-build.ymltried SSH 30 times and then passed even when every attempt failed, so the job failed one step later in "Copy scripts to instance" with anscpconnection error. The step now records a successful attempt and, when all 30 attempts fail, prints::error::SSH to the EIF builder instance did not succeed after 30 attemptsand exits 1. A successful attempt still breaks out of the loop at once.install_dockerinenclave/scripts/setup-nitro-instance.shhas two Docker daemon waits with the same fall-through: one after it starts an installed but stopped Docker service, and one after a fresh install. After 10 faileddocker infoprobes the script carried on,verify_setupchecks onlycommand -v docker, and the first daemon error appeared in the "Build EIF" step. Each wait now logsERROR: Docker daemon did not respond to 'docker info' after 10 attemptsand returns 1.maincallsinstall_dockeras a plain command underset -euo pipefail, so the script exits 1 there, and the "Setup Nitro instance" step fails with it becausesshreturns the remote exit status.if: always(), so they still run when either step fails. The script runs only on the ephemeral builder instance and is not an EIF input (enclave/Dockerfilecopies only the enclave binary), so the PCRs do not change.Notes for reviewers
enclave/scripts/setup-nitro-instance.sh(install_dependencies, from line 146), and ci: declare read-only token permissions for update-pcrs #78 edits theupdate-pcrsjob ineif-build.yml. This PR's hunks do not overlap either one: a three-waygit merge-fileof each PR's file against this branch completes with no conflicts, so the PRs can merge in any order.Pre-merge checklist
actionlint .github/workflows/eif-build.yml(which runs shellcheck onrun:blocks) reports the same 2 pre-existing notes onmainand on this branch, none in "Wait for SSH", and exits 0 with-shellcheck=.shellcheck enclave/scripts/setup-nitro-instance.shreports only the existing SC1091 note for/etc/os-release. The added lines are already inshfmt -i 4 -srform.mise run //:ratchet:lintpasses.run:block, extracted from the workflow and run underbash -e(the step's shell) with a stubssh, exits 0 after 1 call when SSH answers at once, exits 0 after 3 calls when SSH answers on attempt 3, and prints the::error::line and exits 1 after 30 calls when SSH never answers. The block onmainexits 0 in that last case.sudo,systemctl,dnfanddocker, completes with exit 0 whendocker infosucceeds on attempt 2 or 3, for both waits. Whendocker infonever succeeds, it logs the error after 10 probes and exits 1 beforeinstall_dependencies, for both waits. The script onmainlogs✓ Setup complete!and exits 0 in that case.git diff --checkpasses.48f7570: Go (test, lint) and Ratchet.Post-deploy/apply verification
The EIF workflow runs only from
main(workflow_runafter Docker Build, orworkflow_dispatch), so this PR's checks do not run the edited steps.mainafter the merge is green, includingupdate-pcrs, and its log showsSSH is ready!in "Wait for SSH" and✓ Docker daemon started(or✓ Docker service already running) in "Setup Nitro instance".