Skip to content

Config hygiene: validate parameter, flag conflicting flags, dedup source list#101

Merged
jirhiker merged 1 commit into
mainfrom
chore/config-validation-dedup
Jun 29, 2026
Merged

Config hygiene: validate parameter, flag conflicting flags, dedup source list#101
jirhiker merged 1 commit into
mainfrom
chore/config-validation-dedup

Conversation

@jirhiker

Copy link
Copy Markdown
Member

First of two config-system improvements (the quick, low-risk wins). Makes config mistakes surface early instead of failing silently or far downstream.

Changes

  • Config.validate() now:
    • Rejects an unknown parameter (SystemExit, consistent with the existing bbox/county/date checks) — guarded so empty-parameter sites-only flows still pass.
    • Emits an advisory warning when more than one spatial filter (bbox/county/wkt) is set — these resolve with different precedence in bbox_bounding_points (bbox first) vs bounding_wkt (wkt first), so >1 silently does different things.
    • Emits an advisory warning when more than one output mode bool is set (only the first is used at dump time).
  • DIEConfigResource derives the include-list source set from backend.config.SOURCE_KEYS instead of a hardcoded list — kills the "must stay in sync with SOURCE_KEYS" duplication so a new source can't be silently dropped from an include-list product.

Verification

  • tests/test_config_validation.py (new, 9 tests).
  • Full suite 297 passed; dg check defs clean.

Advisory checks are warn-only — no behavior change for valid configs. Follow-up PR introduces a single source registry to collapse the SOURCE_DICT + two *_SOURCE_PAIRS tables.

🤖 Generated with Claude Code

…rce list

Three low-risk improvements to make config mistakes surface early instead of
failing silently or far downstream:

- validate() now rejects an unknown `parameter` (guarded so empty-parameter
  sites-only flows still pass), and emits an advisory warning when more than
  one spatial filter (bbox/county/wkt) or more than one output mode is set —
  states the code currently accepts but resolves inconsistently.

- Orchestration's DIEConfigResource no longer hardcodes the source list for
  include-list products; it derives from backend.config.SOURCE_KEYS, so a new
  source can't be silently dropped (removes the "must stay in sync" note).

Adds tests/test_config_validation.py. Full suite (297) + dg check defs clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Jun 29, 2026 at 08:19 AM (UTC)

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.

1 participant