fix(cli): bound upgrade watch with timeout and progress (RND-568)#161
Open
mpjunior92 wants to merge 1 commit into
Open
fix(cli): bound upgrade watch with timeout and progress (RND-568)#161mpjunior92 wants to merge 1 commit into
mpjunior92 wants to merge 1 commit into
Conversation
The 'ecloud compute app upgrade' command would hang indefinitely after submitting the on-chain transaction whenever the orchestrator was silent (15+ minutes observed in the wild) — there was no deadline, no progress between status transitions, and no recovery hint. - Bound watchUntilUpgradeComplete with a deadline (default 10 minutes, overridable via ECLOUD_WATCH_TIMEOUT_SECONDS env var or an explicit timeoutSeconds option). - Log every status transition on its own line with elapsed seconds, mirroring watchUntilRunning. - On timeout, throw a typed WatchUpgradeTimeoutError carrying appId, lastStatus, elapsedSeconds, and timeoutSeconds. - CLI catches the timeout, prints a recovery hint pointing the user to 'ecloud compute app info <id>' along with txHash and appId, and exits non-zero. Success path is unchanged.
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
ecloud compute app upgradewould hang indefinitely after submitting the on-chain transaction whenever the orchestrator was silent (15+ minutes observed in the wild) — there was no deadline, no progress between status transitions, and no recovery hint.watchUntilUpgradeCompletewith a deadline (default 600s, override via--watch-timeoutflag orECLOUD_WATCH_TIMEOUT_SECONDSenv var; precedence: explicit option > env var > default).watchUntilRunning.WatchTimeoutErrorcarryingappId,lastStatus,elapsedSeconds,timeoutSeconds.ecloud compute app info <id>along with txHash and appId, then exits non-zero. Success path is unchanged.WatchTimeoutErrorandWATCH_DEFAULT_TIMEOUT_SECONDSare intentionally generic — RND-569 reuses the same helpers for the deploy watcher.Resolves RND-568.
Test plan
pnpm --filter @layr-labs/ecloud-sdk run build:devcleanpnpm --filter @layr-labs/ecloud-cli run build:devcleantypecheckclean for the touched files (only pre-existing unrelated test-globals errors)eslintclean on touched filesecloud compute app upgrade --helplists--watch-timeoutwith[env: ECLOUD_WATCH_TIMEOUT_SECONDS]Date.now() >= deadline+instanceofcatch). RND-569 includes a live timeout reproduction that exercises the same helper code paths.