flisk resource <existing> --framework express / -t frontend exits 0 and silently ignores the flag (resource stays hono/backend), while --port on the same call is applied
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Start at the flisk resource command implementation and read the existing resource registration path, then inspect nearby tests for flag handling and idempotent re-registration. Reproduce the four commands in the issue and trace how --framework, --type, --port, and --stack are handled. Done means conflicting flags receive the documented error or warning, no-flag re-registration still succeeds, and tests cover both cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Re-running flisk resource <name> on a resource that already exists reports action: "registered" with exit 0, but --framework and -t/--type are dropped without a warning. --port is applied on the same path, and --stack fails with a hard error, so the handling of flags on an existing resource is inconsistent. A user or agent that passes --framework express gets exit 0 and no sign that nothing changed.
Related: #85 covers the same silent-ignore pattern for --type on a name that exists with a different type. This issue adds --framework, the --port vs --framework inconsistency, and the --stack rejection.
Reproduce
Flisk and tool versions: not investigated (not given in the evidence).
mkdir -p "/tmp/wf-cli-create-run/dir with space/p1" && cd "/tmp/wf-cli-create-run/dir with space/p1"
flisk project --yes --json >/dev/null 2>&1
flisk resource api1 --yes --json # creates backend hono bun, port 4000
flisk resource api1 --framework express --yes --json; echo "exit=$?"
flisk resource api1 -t frontend --yes --json; echo "exit=$?"
flisk resource api1 --port 4999 --yes --json; echo "exit=$?"
flisk resource api1 --stack other --yes --json; echo "exit=$?"
Reproduced in 2 runs, with the same result each time.
Before
Observed behaviour on the existing resource api1 (created as backend, hono, bun, port 4000):
| Flag passed to existing resource | Exit | Observed result | Applied? |
|---|---|---|---|
--framework express |
0 | {"action":"registered","type":"backend","framework":"hono","port":4000,...}; stderr only says "Existing resource detected - will update service.json only" |
No (silently ignored) |
-t frontend |
0 | action: "registered", type: "backend" |
No (silently ignored) |
--port 4999 |
0 | port changes 4000 -> 4999 | Yes |
--stack other |
1 | A resource named "api1" already exists at services/main/api1. |
Rejected |
Summary: of 4 flags passed to an existing resource, 1 was applied, 2 were silently ignored with exit 0, and 1 was rejected.
After
Expected:
- A flag that conflicts with the existing resource (
--framework,--type,--language) fails with a non-zero exit and a message such asapi1 already exists as backend/hono; drop --framework or pick another name. - Or, at minimum, a warning is printed and the ignored flags are listed in the JSON envelope.
- Handling of
--port,--stackand--frameworkis consistent.
Acceptance criteria
-
flisk resource api1 --framework express --yeson an existing hono backend exits non-zero, or prints a warning and lists the ignored flag in the--jsonoutput. It must not exit 0 silently. -
flisk resource api1 -t frontend --yeson an existing backend gets the same treatment as--framework. -
--port,--stackand--frameworkon an existing resource follow one documented rule. - A test covers the conflicting-flag case on an existing resource and asserts the exit code and message. A test also covers the no-flag idempotent re-registration, which must still succeed.
- The #85
--typecase is covered by the same change, or it is explicitly linked and closed.
Notes
- Related: #85 (
flisk resource: --type is silently ignored when the name already exists with a different type (exit 0)), open at filing time. It has the same silent-ignore root symptom for--type. - Other open issues seen in the same search, not duplicates: #86, #109, #118.
- Impact:
flisk resourceis an entry point for scripts and agents, so a silent exit 0 leaves callers believing a flag was applied.
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 2
- Merge medio
- 11h 39m
- PR unite (30g)
- 92
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di flisk-sh/flisk-cli
-
area: infrastructure community docs docs-mismatch documentation dogfood dx good first issue has-repro priority:low small-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area: cli dogfood dx enhancement error-messages good first issue has-repro misleading-message priority:low small-fix tdd tech: typescript
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
flisk-sh/flisk-cli#196 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: cli discoverability docs-mismatch dogfood dx enhancement good first issue has-repro priority:low small-fix tdd tech: typescript
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
flisk-sh/flisk-cli#195 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: cli bug discoverability docs-mismatch documentation dogfood error-messages has-repro misleading-message priority:medium small-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area: cli bug dx good first issue has-repro needs-test priority:medium small-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
flisk-sh/flisk-cli#176 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di flisk-sh/flisk-cli
Issue simili
-
accessibility area:ci ci-test level:low priority:high type:test
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
skytuhua-org/Gen-V1#3132 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
drmrd/vernacular#1238 ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
enhancement migration-prioritized
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Hudson-Pufferfish/local-party-console#136 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno