Running poetry run poe assemble on a clean checkout of main produces ~350 lines of style drift in airbyte_cdk/sources/declarative/models/declarative_component_schema.py (e.g. conint/confloat usage, class reordering) that does not match the committed file, so contributors hand-patch the generated model instead of regenerating it.
Consequences observed while adding UnionPartitionRouter (#1071):
- The YAML schema declares
minItems: 2 on UnionPartitionRouter.partition_routers, but the generated model has no corresponding constraint. The current codegen does not emit min_items, and pydantic v1 rejects a hand-added min_items=2 on this self-referential List[Union[...]] field at import time ("field constraints are set but not enforced").
- There is no CI check that the committed generated file matches
poe assemble output, so hand-maintained divergence accumulates silently.
Suggested follow-ups:
- Pin/align the datamodel-code-generator version so
poe assemble reproduces the committed file byte-for-byte.
- Add an assemble-check CI job.
- Decide whether array constraints like
minItems should be reflected in the generated models (may require pydantic v2 or generator options).
Requested by tolik0 in review of PR #1071 (comment #1071 (comment)).
Devin session
Running
poetry run poe assembleon a clean checkout ofmainproduces ~350 lines of style drift inairbyte_cdk/sources/declarative/models/declarative_component_schema.py(e.g.conint/confloatusage, class reordering) that does not match the committed file, so contributors hand-patch the generated model instead of regenerating it.Consequences observed while adding
UnionPartitionRouter(#1071):minItems: 2onUnionPartitionRouter.partition_routers, but the generated model has no corresponding constraint. The current codegen does not emitmin_items, and pydantic v1 rejects a hand-addedmin_items=2on this self-referentialList[Union[...]]field at import time ("field constraints are set but not enforced").poe assembleoutput, so hand-maintained divergence accumulates silently.Suggested follow-ups:
poe assemblereproduces the committed file byte-for-byte.minItemsshould be reflected in the generated models (may require pydantic v2 or generator options).Requested by tolik0 in review of PR #1071 (comment #1071 (comment)).
Devin session