From 93c3f418076ef286e1e8db03e323741c16f19068 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2026 16:08:15 +0000 Subject: [PATCH] Fail fast when the VM has no identity token and install rsync portably The agent publishes the literal "unset" as stickyDiskToken when the backend did not mint a token for the VM. Reject it before phoning home so the job log explains the problem instead of a bare HTTP 401 from the backend. The rsync step assumed apt-get; macOS runners ship rsync, and brew is the fallback when it is missing. Co-Authored-By: aayush@blacksmith.sh --- action.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5b8709a..a48fa41 100644 --- a/action.yml +++ b/action.yml @@ -72,6 +72,13 @@ runs: echo "::error::Could not read required metadata (backendURL, installationModelID, stickyDiskToken); the testbox cannot phone home." exit 1 fi + # The agent publishes the literal "unset" when the backend did not mint a + # token for this VM. Fail here with a clear message instead of letting the + # backend reject it as an invalid token. + if [ "$AUTH_TOKEN" = "unset" ]; then + echo "::error::This VM was not issued an identity token (stickyDiskToken=unset), so the testbox cannot phone home. This runner image/region does not support Testbox yet; contact Blacksmith support." + exit 1 + fi if [ -n "$BLACKSMITH_HOSTNAME" ]; then RUNNER_HOST="$BLACKSMITH_HOSTNAME" @@ -202,4 +209,14 @@ runs: if: steps.metadata.outputs.available == 'true' && inputs.testbox_id shell: bash run: | - which rsync || sudo apt-get install -y rsync + if command -v rsync >/dev/null 2>&1; then + exit 0 + fi + if command -v apt-get >/dev/null 2>&1; then + sudo apt-get install -y rsync + elif command -v brew >/dev/null 2>&1; then + brew install rsync + else + echo "::error::rsync is not installed and no supported package manager was found." + exit 1 + fi