Context
RuntimeEntry was added in #169 (T2-1). The path field is documented as only meaningful for dlt-project runtimes, but a type: dlt-project entry with no path currently parses cleanly and only fails later when something tries to resolve it.
Goal
Add a model_validator(mode="after") to RuntimeEntry that:
- Requires
path when type == "dlt-project"
- Optionally rejects
path when type is one of the cloud-managed types (fivetran, airbyte, estuary, dlt-managed) since it has no meaning there
Acceptance
- A
dlt-project entry with no path raises a ValidationError at parse time with a clear message
- An unknown
type: value is rejected (already enforced by Literal, but add a negative test to confirm)
pytest tests/test_project.py covers both paths with negative tests
Depends on
#169
Notes
Deferred from the #169 review — neither field is consumed anywhere in src/ yet so there is no user-facing exposure in the meantime.
Context
RuntimeEntrywas added in #169 (T2-1). Thepathfield is documented as only meaningful fordlt-projectruntimes, but atype: dlt-projectentry with nopathcurrently parses cleanly and only fails later when something tries to resolve it.Goal
Add a
model_validator(mode="after")toRuntimeEntrythat:pathwhentype == "dlt-project"pathwhen type is one of the cloud-managed types (fivetran,airbyte,estuary,dlt-managed) since it has no meaning thereAcceptance
dlt-projectentry with nopathraises aValidationErrorat parse time with a clear messagetype:value is rejected (already enforced byLiteral, but add a negative test to confirm)pytest tests/test_project.pycovers both paths with negative testsDepends on
#169
Notes
Deferred from the #169 review — neither field is consumed anywhere in
src/yet so there is no user-facing exposure in the meantime.