feat: configurable setup script timeout (CYPACK-1080)#1114
Open
cyrusagent wants to merge 1 commit into
Open
Conversation
Setup scripts were killed after a hard-coded 5-minute timeout, which is too short for steps like full database restores. Expose two overrides in ~/.cyrus/config.json: - `setupScriptTimeoutMs` on a repository entry — controls the timeout for `cyrus-setup.sh`/`.ps1`/`.cmd`/`.bat` for that repo. - `global_setup_script_timeout_ms` at the top level — controls the timeout for `global_setup_script`. Both are in milliseconds and default to 300_000 (5 minutes), preserving existing behavior for users who don't set them.
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.
Assignee: @Connoropolous (connor)
Summary
Setup scripts previously had a hard-coded 5-minute timeout, which is too short for steps like a full database restore. Introduces per-repo and global overrides in
~/.cyrus/config.json.Fixes CYPACK-1080 (GitHub issue #1102).
Changes
setupScriptTimeoutMs(number, per-repo) — timeout in milliseconds for the repository setup script (cyrus-setup.sh/.ps1/.cmd/.bat). Added toRepositoryConfig.global_setup_script_timeout_ms(number, top-level) — timeout in milliseconds for the global setup script. Added toEdgeConfig.300000(5 minutes), so unchanged configs behave exactly as before.Implementation
packages/core/src/config-schemas.ts: added both Zod fields; JSON schemas regenerated.packages/edge-worker/src/GitService.ts:runSetupScriptandrunRepoSetupScriptnow accept atimeoutMsparameter;CreateGitWorktreeOptions.globalSetupScriptTimeoutMsis threaded throughcreateGitWorktree→createSingleRepoWorktree→runSetupScript; per-repo timeout is read fromrepository.setupScriptTimeoutMs.apps/cli/src/services/WorkerService.ts: forwardsedgeConfig.global_setup_script_timeout_msintocreateGitWorktree.docs/SETUP_SCRIPTS.md,docs/CONFIG_FILE.md: documented both new fields with JSON examples.Test plan
packages/edge-worker/test/GitService.test.tscover:globalSetupScriptTimeoutMsoption is honored for the global setup scriptrepository.setupScriptTimeoutMsis honored for the per-repo setup scriptpnpm test:packages:run— all 571 edge-worker tests passpnpm typecheck— clean across all packagespnpm biome check— no new warnings introduced