Bug: `dokploy application update` nullifies omitted settings (sourceType, buildType, triggerType, autoDeploy, ...)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
src/generated/commands.ts の836–960行付近を読み、次に application.one と application.update がどのように使われているかを調べてください。部分更新のセマンティクスをクライアントとサーバーのどちらで適用すべきかを判断してください。1つの指定フィールドを更新したときに、sourceType、buildType、triggerType、autoDeploy などの省略された設定が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 152
- フォーク
- 46
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Dokploy/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100