Bug: `dokploy application update` nullifies omitted settings (sourceType, buildType, triggerType, autoDeploy, ...)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 50/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
Direzione di ricerca
Leggi src/generated/commands.ts intorno alle righe 836–960, quindi esamina come vengono usati application.one e application.update. Decidi se il client o il server debba applicare la semantica degli aggiornamenti parziali; il lavoro è completato quando l’aggiornamento di un singolo campo fornito conserva le impostazioni omesse come sourceType, buildType, triggerType e autoDeploy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug: dokploy application update nullifies omitted settings (sourceType, buildType, triggerType, autoDeploy, ...)
Summary
dokploy application update sends only the flags provided on the command line as the full request body. Every setting not explicitly passed is omitted from the payload, and the server's application.update overwrites those omitted fields (observed: sourceType, buildType, triggerType, autoDeploy reset to null/None). Changing a single field via the CLI silently wipes other important application settings.
Environment
dokploy --version→0.29.14- CLI package:
@dokploy/cli0.29.14 - Server: self-hosted Dokploy (redacted host)
Repro (user-observed)
- Create an application with a real source (
github), abuildType(e.g.nixpacks), andautoDeployenabled. - Run a partial update of one field:
dokploy application update --applicationId <id> --name "Renamed" - Open the application in the dashboard.
Expected: only name changes; sourceType, buildType, triggerType, autoDeploy remain.
Actual: sourceType, buildType, triggerType, autoDeploy are reset to None/empty.
Root cause (verified in src/generated/commands.ts, lines ~836–960)
The generated application update action collects only the flags the user provided into opts and posts them directly:
const data = await apiPost("application.update", opts);
opts is never merged with the current application state read from application.one. Any field the user does not pass is therefore absent from the request body. The server's application.update tRPC procedure treats the submitted body as the desired full state and overwrites omitted fields with null/undefined, rather than leaving them unchanged.
The CLI treats update as "send what I gave you" (partial intent), while the server treats the body as authoritative/full state — a partial-update contract mismatch. The dashboard edit form does a read-then-patch merge; the CLI does not.
Additional environment note
The companion read command used to inspect before updating is currently broken too: dokploy application one --applicationId <id> fails with 400 (related to issue #48/#46 — apiGet query-param handling). Reading via a correctly-encoded API call (/api/application.one?applicationId=<id> with x-api-key) returns the full object and confirms the at-risk fields are populated (e.g. sourceType: "github", buildType: "nixpacks", triggerType: "push", autoDeploy: true).
Suggested directions (maintainers to decide)
- Client-side fix: in the
application updateaction, first fetch the current app (application.one), merge the provided flags over the returned state, and send the complete object — matching the dashboard's read-then-patch behavior. - Server-side fix: make
application.updatea true partial merge (only update keys present in the payload), which would also make the CLI's current behavior correct.
Notes
- Distinct from issues #48 / #46: those concern
GET/read commands (apiGetquery-param handling) and, per #48, explicitly do not affectupdate(aPOST). - I did not run a destructive partial update against a live production application to reproduce, to avoid wiping real settings; the mechanism is confirmed from the generated source and the values at risk were confirmed present via the working read endpoint.
- Lingua principale
- TypeScript
- Stelle
- 152
- Fork
- 46
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri 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 Dokploy/cli
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
TanStack/tanstack.com#1293 ·