Skip to content

feat: declare an app's storage mounts as a set - #560

Merged
josegonzalez merged 1 commit into
mainfrom
528-make-an-app-s-storage-attachments-declarable-as-a-set
Sep 24, 2026
Merged

josegonzalez merged 1 commit into
mainfrom
528-make-an-app-s-storage-attachments-declarable-as-a-set

Conversation

@josegonzalez

Copy link
Copy Markdown
Member

dokku_storage_mount gains a mounts list scoped to one process type. state: set makes the list that process type's complete set of mounts and removes any it omits, state: clear removes them all, and present and absent add or remove the listed mounts while keeping the rest, each in a single write. docket export now emits an app's mounts as one state: set task per process type, and the single-mount form now takes process_type into account when deciding whether a mount already exists.

This relies on the per-mount fields storage:mount --replace gained in dokku 0.38.30 (dokku/dokku#9072), which is already docket's minimum version. A process type is the unit of authority because --replace and storage:unmount --all --process-type each act on exactly one, so a recipe managing several process types declares one task per process type. The list form cannot carry a key=value or ro/rw volume option, since --replace would reject or reinterpret it; docket validate refuses one in the list, present and absent fail to plan when another mount of the process type carries one, and export falls back to single-mount tasks for that process type.

The single-mount form previously treated a mount of the same entry at the same path for a different process type as already present, so it was never applied. A recipe that omits process_type for a mount stored under a named process type now plans a change instead of reporting it in sync.

Closes #528

`dokku_storage_mount` gains a `mounts` list scoped to one process type. `state: set` makes the list that process type's complete set of mounts and removes any it omits, `state: clear` removes them all, and `present` and `absent` add or remove the listed mounts while keeping the rest, each in a single write. `docket export` now emits an app's mounts as one `state: set` task per process type, and the single-mount form now takes `process_type` into account when deciding whether a mount already exists.
@josegonzalez
josegonzalez merged commit f916fc6 into main Sep 24, 2026
19 checks passed
@josegonzalez
josegonzalez deleted the 528-make-an-app-s-storage-attachments-declarable-as-a-set branch September 24, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make an app's storage attachments declarable as a set

1 participant