Skip to content

feat: declare what each task example requires - #667

Merged
josegonzalez merged 1 commit into
mainfrom
652-example-requires
Oct 22, 2026
Merged

josegonzalez merged 1 commit into
mainfrom
652-example-requires

Conversation

@josegonzalez

Copy link
Copy Markdown
Member

Each catalog example now publishes requires, the tasks to apply before it in apply order, so the required tasks followed by the example make a complete recipe, and each reference page prints them with the example. Most of the list is derived from the task's plugin requirements and objects: a dokku_plugin for each plugin it needs, then dokku_app or dokku_service_create for each object it names but does not create, each after what it needs in turn, and sdk.TaskRequires exposes that derivation with sdk.TaskTypeOf to name the results. Examples that need more declare it: a deployed app for dokku_service_link, dokku_letsencrypt and dokku_app_clone, HTTP auth for the dokku_http_auth_* tasks, the storage entry, network and node profile the mount, network property and node sysctls examples name. The example integration tests now set up from requires, so exampleIntegrationPolicy keeps only what a task cannot express: the k3s, letsencrypt and docker-link environment gates, the skips, git_from_archive's fresh app per example, and the placeholder rewrites for certs, registry auth, the maintenance tarball and the letsencrypt DNS record. The setup-dokku action now pins dokku-postgres, which the postgres examples require, so they run in CI instead of skipping. requires is an additive key, so the catalog stays at version 1.

Closes #652

Each catalog example now publishes `requires`, the tasks to apply before it in apply order, so the required tasks followed by the example make a complete recipe, and each reference page prints them with the example. Most of the list is derived from the task's plugin requirements and `objects`: a `dokku_plugin` for each plugin it needs, then `dokku_app` or `dokku_service_create` for each object it names but does not create, each after what it needs in turn, and `sdk.TaskRequires` exposes that derivation with `sdk.TaskTypeOf` to name the results. Examples that need more declare it: a deployed app for `dokku_service_link`, `dokku_letsencrypt` and `dokku_app_clone`, HTTP auth for the `dokku_http_auth_*` tasks, the storage entry, network and node profile the mount, network property and node sysctls examples name. The example integration tests now set up from `requires`, so `exampleIntegrationPolicy` keeps only what a task cannot express: the k3s, letsencrypt and docker-link environment gates, the skips, git_from_archive's fresh app per example, and the placeholder rewrites for certs, registry auth, the maintenance tarball and the letsencrypt DNS record. The setup-dokku action now pins dokku-postgres, which the postgres examples require, so they run in CI instead of skipping. `requires` is an additive key, so the catalog stays at version 1.
@josegonzalez josegonzalez added the enhancement New feature or request label Oct 22, 2026
@josegonzalez
josegonzalez merged commit a436334 into main Oct 22, 2026
23 of 24 checks passed
@josegonzalez
josegonzalez deleted the 652-example-requires branch October 22, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: declare what each task example requires

1 participant