Repository navigation
Closed
Labels
Description
Part of #4839 (split from it in task TALE-176).
Problem
#4839 addendum 1, defect 4, and addendum 5, defect 14. Paths are under tools/cli/src/.
| # | Defect | Code | What the operator sees |
|---|---|---|---|
| 4 | tale deploy --override-all asks for consent only after the deploy, including the restarts it forces |
--override-all implies --stop (lib/actions/run-deploy.ts:140) and force-recreation (:87-90). So the stop-gated db, object-store and proxy (lib/compose/types.ts:152) are recreated (lib/actions/deploy.ts:575-584). It also forces the snapshot (deploy.ts:506-509, :520). Then come the new colour (:847-856), the traffic switch (:869), the old colour's retirement (:876) and the file sync (:900). Only then does reseedAllOrgsFromBuiltin (:912-917) check consent (lib/actions/reseed-all-orgs.ts:113-125). The try has no catch (deploy.ts:923 } finally {), so nothing is undone |
In CI without --yes: "--override-all requires --yes (-y) when stdin is not a TTY (e.g. CI)." It is a plain Error (reseed-all-orgs.ts:116), so exit code 1. The new version and the restarts are already live. Declining interactively: "Aborted by user." (:123), then "Deployment complete! Version … is now live" (deploy.ts:920), after downtime that only the reseed needed |
| 14 | The global --yes doesn't reach the Docker install gate |
The root option is index.ts:48 .option('-y, --yes', 'assume "yes" for all prompts (non-interactive)'), and resolveConsent honours it (utils/output-mode.ts:97-99). But run-deploy.ts:68 const docker = await ensureDocker({ assumeYes: options.yes }); passes only deploy's own --yes (default false, commands/deploy/index.ts:57-61). lib/docker/ensure-docker.ts:595 if (!interactive && !opts.assumeYes) { then refuses |
On a fresh host, tale --yes deploy in CI stops with "Docker is not installed and this is a non-interactive shell. Re-run with --yes to allow the CLI to install Docker, or install it from …" (ensure-docker.ts:599), exit code 3 (run-deploy.ts:70). The operator already passed --yes |
Notes, all at 29e9445:
- optimize rag action #4, a third variant: the reseed gate checks only stdin (
reseed-all-orgs.ts:113), butconfirmneeds stdin and stdout to be terminals (utils/prompt.ts:62). With stdout piped, the run prints only "Aborted." and exits 4 (utils/run-command.ts:32-33), after the deploy is live. - optimize rag action #4: nothing before
deploy()asks for--override-allconsent.run-deploy.ts:54-62only refuses combining it with--override. - feat(crawler): reorganize the code and improve URL capture reliability and quality #14,
tale deploy --yesis refused the same way (static reading, not run). Commander 14.0.3 (tools/cli/package.json:31) resolves root options anywhere on the command line. The repo says so atutils/update-version-flag.ts:2and tests it atutils/update-version-flag.test.ts:35. Nothing undertools/clicallsenablePositionalOptionsorpassThroughOptions, andindex.ts:160reroutes onlyupdate --version. So the root option also claimstale deploy --yes, deploy'soptions.yesstaysfalse, and "Re-run with --yes" can't help either placement. - feat(crawler): reorganize the code and improve URL capture reliability and quality #14: interactive runs are unaffected, because
confirmhonours the global flag (utils/prompt.ts:49).lib/actions/dev.ts:251andlib/actions/sandbox-device.ts:79pass the global flag toensureDocker. The??used indev.tswould not work for deploy, whose local--yesdefaults tofalse.
Expected
- optimize rag action #4: resolve the
--override-allconsent before anything changes, next to the usage check (run-deploy.ts:54-62) and beforeensureDocker(:68). Declining, or a missing--yeswithout a terminal, must leave the running deployment untouched.--dry-runkeeps its current early return (reseed-all-orgs.ts:104-110). - feat(crawler): reorganize the code and improve URL capture reliability and quality #14: have
ensureDockeruseresolveConsent(opts.assumeYes), like the reseed prompt does (reseed-all-orgs.ts:114). Thentale --yes deployandtale deploy --yesboth pass the gate.
Regression:
- optimize rag action #4: a
run-deploytest withoverrideAll, no TTY and no--yesthrows before any Docker call, and an interactive decline makes nodeploy()call.lib/actions/run-deploy.test.tsdoesn't exist at 29e9445; task TALE-176 (the--hostpart of bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839, not yet ontrain) adds it, with injectable seams forensureDockeranddeploy(RunDeployDeps);lib/actions/reseed-all-orgs.test.tshas the stdin helperdetachTty(:46-51) and the global-ysetup (:77). At 29e9445 both cases reachdeploy(). - feat(crawler): reorganize the code and improve URL capture reliability and quality #14: in
lib/docker/ensure-docker.test.ts, with Docker missing,{ interactive: false }and the global flag set (setActiveOutputMode(resolveOutputMode({ yes: true }, {})), as atreseed-all-orgs.test.ts:77),ensureDockermust not returnrefused. No test asserts the:595refusal today. At 29e9445 this case is refused.
Severity and owner
- Severity: optimize rag action #4 medium (addendum 1); feat(crawler): reorganize the code and improve URL capture reliability and quality #14 not stated.
- Owner: CLI (deploy).
- Evidence: static reading at
train29e9445, same atfeature-train12625af; nothing was run. The cited paths are unchanged attrain1ae4a95 andfeature-train2334ceb. - Related: none named in the sources. The stdout-piped variant ends in the bare "Aborted." of bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839 addendum 3, defect 6 (bug(cli): a prompt with no terminal prints only "Aborted."; deploy provision needs --yes #5171).
Activity
fix(cli): confirm --override-all before deploying, honour global --yes
fix(cli): confirm --override-all before deploying, honour global --yes
fix(cli): confirm --override-all before deploying, honour global --yes
fix(cli): confirm --override-all before deploying, honour global --yes