docs: list the env vars missing from the configuration reference

Merged
SC
6h ago
+36-0

Summary

The configuration reference did not list 17 environment variables that the loader binds on main. Two of the keys behind them, worker.shutdown_timeout and coordinator.worker_wait_timeout, were not documented at all.

How the list was made:

grep -o 'env: *"[A-Z0-9_]*"' internal/cmn/config/loader.go \
  | sed 's/.*"\(.*\)"/DAGU_\1/' | sort -u > code_env.txt
grep -o 'DAGU_[A-Z0-9_]*' server-admin/reference.md | sort -u > doc_env.txt
comm -23 code_env.txt doc_env.txt

After this PR the comm output is empty.

Changes

  • worker.shutdown_timeout / DAGU_WORKER_SHUTDOWN_TIMEOUT (dagucloud/dagu#3062): YAML example, env var with the supervisor stop timeout advice from the schema, and the defaults list (60s, 0 waits without a bound).
  • coordinator.worker_wait_timeout / DAGU_COORDINATOR_WORKER_WAIT_TIMEOUT (dagucloud/dagu#3198): YAML example, env var, and the defaults list (2m, 0 refuses the dispatch at once). This one is on main but not in a release yet, so it is a separate commit in case you prefer to hold it until the next release.
  • DAGU_CORS_ALLOWED_ORIGINS, DAGU_BROWSER_GUARD_CLIENT_CERTIFICATES, DAGU_OPENCODE_EXECUTABLE and DAGU_OPENCODE_ENV_PASSTHROUGH, with links to the pages that already describe them.
  • Cloud secret provider defaults: DAGU_SECRETS_AWS_REGION, DAGU_SECRETS_GCP_PROJECT_ID, DAGU_SECRETS_GCP_LOCATION, DAGU_SECRETS_AZURE_VAULT_URL and DAGU_SECRETS_ALIBABA_{REGION,ENDPOINT,CA_FILE}, plus the matching secrets.* keys in the YAML example. The provider pages already document them.
  • DAGU_NAVBAR_COLOR, DAGU_NAVBAR_TITLE, DAGU_LOG_ENCODING_CHARSET and DAGU_MAX_DASHBOARD_PAGE_LIMIT are bound as "UI (legacy)" aliases of the DAGU_UI_* variables. They are now in the legacy list, with a note that DAGU_UI_* wins when both are set.

Checks

  • node scripts/validate-examples.mjs with Dagu built from main (0689a90): 912 examples validated
  • pnpm build
  • pnpm test:worker
  • git diff --check
  • With Dagu main: DAGU_NAVBAR_TITLE alone sets the title; with DAGU_UI_NAVBAR_TITLE also set, the DAGU_UI_* value is used.

Summary by cubic

Adds the 17 environment variables missing from the configuration reference, now covering every variable the loader binds on main. Two keys, worker.shutdown_timeout and coordinator.worker_wait_timeout, were not documented at all and now include YAML examples, env var entries, and default behavior.

Changes:

  • Adds CORS, browser guard, OpenCode, and cloud secret provider env vars with links to their existing pages.
  • Lists DAGU_NAVBAR_COLOR, DAGU_NAVBAR_TITLE, DAGU_LOG_ENCODING_CHARSET, and DAGU_MAX_DASHBOARD_PAGE_LIMIT as legacy UI aliases, with the DAGU_UI_* value winning when both are set.
  • Keeps the coordinator.worker_wait_timeout commit separate since it is not in a release yet, in case you prefer to hold it until the next release.