Commit Graph
41 Commits
Author SHA1 Message Date
Jose Diaz-Gonzalez 3bf6c72451 fix: align Go-plugin :report JSON keys with bash-strip convention
Every Go-implemented plugin's `:report --format json` now emits keys without the redundant `<plugin>-` head segment, matching the shape bash plugins have always emitted. The CLI flag names and `:set` semantics are unchanged. For backwards compatibility during the 0.38.x patch series, the legacy `<plugin>-<property>` keys are emitted side-by-side with the new keys, and a future major release will drop the legacy keys. `common.ReportSingleApp` is refactored to accept a `ReportSingleAppInput` struct with a `Validate()` method so the input is checked before any work runs, which also catches the latent `"docker options"` reportType bug at the API boundary.
2026-05-27 07:17:00 -04:00
Jose Diaz-Gonzalez cdcf1fc669 test: backfill raw/global/computed report triplet coverage across plugins
The bats coverage for plugin :report keys has been uneven since the raw/global/computed split landed in PR #8640. This commit adds a single combined triplet test per settable property across app-json, builder, builder-dockerfile, builder-herokuish, builder-lambda, builder-nixpacks, builder-pack, builder-railpack, buildpacks, cron (maintenance), git (keep-git-dir, rev-env-var, source-image), logs (vector-sink, vector-global-image, vector-global-networks), network (attach-post-create, attach-post-deploy, initial-network), proxy (per-app type), ps (stop-timeout-seconds), registry (image-repo, push-on-release, push-extra-tags), storage (build/deploy/run mounts), and adds a new tests/unit/scheduler.bats and tests/unit/nginx-vhosts_properties.bats. Brings ps `procfile-path` and `stop-timeout-seconds` global getters in line with the #8640 convention (raw global, default resolved in computed). Documents the read-only and internal properties that surface in `:report` (or are written by Dokku) but cannot be managed by `:set` in a new `## Internal properties` section appended to each affected plugin's docs page.
2026-05-23 00:05:33 -04:00
Jose Diaz-Gonzalez 76b033234f fix: split report global keys into raw and computed across plugins
The `<plugin>-global-<property>` keys in `:report` output returned the resolved value with the built-in default substituted in, so external tooling could not distinguish a property that had been set globally to the default from one that had never been set. The bare keys for caddy, haproxy, and traefik global-only properties had the same shape. The `global-<property>` keys now hold the raw stored value and are empty when nothing has been set, and a new `computed-<property>` key holds the effective value used at runtime, falling back through the per-app value (where one exists), the global value, and the built-in default. The bare global-only keys for the three proxy plugins are removed in favor of the raw/computed pair. Closes #8631.
2026-05-23 00:05:33 -04:00
Jose Diaz-Gonzalez 4eee229bbc fix: rename app-json:report flags to match property
The property name set via `app-json:set` is `appjson-path`, but the matching read-back flags on `app-json:report` were named `--app-json-selected`, `--app-json-global-selected`, and `--app-json-computed-selected`. The mismatch meant `dokku app-json:report <app> --app-json-appjson-path` (the form already documented in deployment-tasks.md) was rejected as an invalid flag, and the `--format json` output advertised keys that did not correspond to any settable property. The flags and JSON keys are renamed to `--app-json-appjson-path`, `--app-json-global-appjson-path`, and `--app-json-computed-appjson-path` so that the property name round-trips through set and report.
2026-05-10 22:32:16 -04:00
Jose Diaz-Gonzalez 3ba51725be fix(tests): adapt app.json fixtures and tini test for env processing
Pre-set LOCAL_DOMAIN in the tini test so mastodon's required env var
resolves, and replace unsupported `generator: "echo 5"` with `value: "5"`
in the nodejs-express and dockerfile fixtures so WEB_CONCURRENCY no
longer aborts deploys via the new app.json env processor.
2026-04-26 22:43:32 -04:00
Jose Diaz-Gonzalez 6b67d5c59b tests: do not modify the existing app.json via jq
The jq binary doesn't support jsonc, so we can't modify it for testing purposes. Instead, just create an app.json with the correct heroku.postdeploy task.
2025-11-20 00:44:26 -05:00
Jose Diaz-Gonzalez 551eae0c5b chore: remove references to pack being experimental
It is no longer experimental and is here to stay.
2025-11-09 20:32:39 -05:00
Jose Diaz-Gonzalez 9490034412 tests: update tests for cnb builder 2024-09-29 00:04:58 -04:00
Jose Diaz-Gonzalez 9678c1c0b8 tests: update test for new deployment task output 2024-04-04 23:21:22 -04:00
Jose Diaz-Gonzalez c7e1f2d380 fix: update test to fix case where intermediate containers are now immediately removed 2024-02-25 16:12:07 -05:00
Jose Diaz-Gonzalez 5846301a48 tests: make it possible to specify an alternative base domain for tests
When developing Dokku, it is useful to use a real domain to test actual functionality. This is impossible if the domain is hardcoded to dokku.me in testing.
2023-08-05 20:58:26 -04:00
Jose Diaz-Gonzalez 0eccfe8ba4 tests: add test ensuring the build-dir property is supported 2023-02-14 03:08:02 -05:00
Jose Diaz-Gonzalez 9f6aade092 fix: run unbuffered 2022-12-28 16:42:36 -05:00
Jose Diaz-Gonzalez 9d332e9b2d chore: run shfmt against all test files 2022-07-21 14:57:42 -04:00
Jose Diaz-Gonzalez d9204083f7 fix: install pack
Also move the installation into a helper method.
2021-08-12 22:07:53 -04:00
Jose Diaz-Gonzalez 997cc4f466 tests: shore up test checks 2021-08-12 21:12:15 -04:00
Jose Diaz-Gonzalez 620a36be82 tests: enhance release tests to check global secrets 2021-08-12 17:36:01 -04:00
Jose Diaz-Gonzalez 10f6d00e04 tests: add test to ensure herokuish respects the env vars during the release process 2021-08-12 16:16:08 -04:00
Jose Diaz-Gonzalez 618158a0f3 refactor: deprecate the --rm and --rm-container flags
These flags are not commonly invoked by users, causing issues when cleaning up old containers. Rather than instruct users to use some random flag, just change the default to what is likely to be more common.
2021-07-27 02:58:19 -04:00
Jose Diaz-Gonzalez 2580ad305c tests: ensure app deploys successfully by default in appjson-path test 2021-07-10 14:57:58 -04:00
Jose Diaz-Gonzalez 441d1c2676 tests: add test for non-existent file 2021-07-10 14:57:58 -04:00
Jose Diaz-Gonzalez 0ab135b034 tests: add test for app-json:set 2021-07-10 14:57:58 -04:00
Jose Diaz-Gonzalez 356ed6f9eb feat: modify the deployment task if the detected entrypoint is tini
Closes #4522
2021-03-25 20:17:16 -04:00
Jose Diaz-Gonzalez 38910c7c48 tests: split app-json tests into two files
This should decrease the test matrix runtime.
2021-03-25 20:13:30 -04:00
Jose Diaz-Gonzalez 97aa934343 feat: do not reinstall pack during bats tests 2021-03-25 20:12:39 -04:00
Jose Diaz-Gonzalez 52a88d63ad tests: fix postdeploy test 2021-02-28 14:39:16 -05:00
Jose Diaz-Gonzalez f98e7702fb feat: implement heroku's postdeploy deployment task
This occurs during the postdeploy on the first deploy of an app, mimicking heroku. It currently happens _after_ the `postdeploy` and `release` deploy tasks.
2021-02-28 04:51:42 -05:00
Jose Diaz-Gonzalez 5e7ea4217f tests: install pack for app-json tests 2021-02-11 07:34:27 -05:00
Jose Diaz-Gonzalez 123fbea7c0 feat: add a deployment task test for cnb 2021-02-11 07:16:54 -05:00
Jose Diaz-Gonzalez a7465f9d81 tests: use github actions instead of circleci for test running 2021-01-20 14:00:07 -05:00
Jose Diaz-Gonzalez 365356eb5f fix: output is expected twice 2020-12-22 11:52:02 -05:00
Jose Diaz-Gonzalez 044cc4a618 fix: rename duplicate test 2020-12-22 01:30:16 -05:00
Jose Diaz-Gonzalez 26b95854d4 fix: properly parse releease command when there is an entrypoint
Closes #4232
2020-12-11 11:44:13 -05:00
Jose Diaz-Gonzalez 5d7b2a84f4 fix: set DATABASE_URL so dj-database-url properly configures a database config 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez 2b65def123 fix: pass command directly to entrypoint
Closes #3706
2020-08-31 18:36:07 -04:00
Jose Diaz-Gonzalez 84367e1c16 fix: correctly handle injecting environment variables to deployment tasks
Also test that release tasks are invoked the correct environment.

Closes #3817
2020-08-31 15:01:14 -04:00
Jose Diaz-Gonzalez 7e7931f1ce fix: add run prefix to deploy_app calls 2020-08-31 04:52:44 -04:00
Jose Diaz-Gonzalez 53dabf7fd0 refactor: fix handling of string andd array CMD and ENTRYPOINT values
Previous versions extracted the values as strings, prefixing the values with `/bin/sh -c '$CMD'` unnecessarily. This caused issues where we would incorrectly overrride these values when an app had a predeploy script.

Closes #3143
2020-08-31 02:31:36 -04:00
Jose Diaz-Gonzalez beb42b53b2 tests: ensure the deploy succeeeds 2020-08-30 14:51:02 -04:00
Jose Diaz-Gonzalez 939cb67daa fix: remove container after use 2020-08-30 13:41:14 -04:00
Jose Diaz-Gonzalez 5fd04001d8 feat: split out test files and execute them manually
This breaks the old grouping mechanism, but honestly that was a weird way of doing it.
2020-06-20 13:22:47 -04:00