Body
When a Connection has conn_type=None (which is valid for secrets backend connections), ConnectionResponse.model_validate(connection) fails because the Pydantic model requires conn_type: str (not optional).
TLDR:
- Secrets backends can return connections without conn_type (backward compatible with Airflow 2)
- The database model requires
conn_type (nullable=False), but secrets backend connections are ephemeral and don't go through the database.
Qns that need investigation:
- Should ConnectionResponse models allow
conn_type: str | None to support secrets backend connections?
- What's the impact on API consumers (UI, CLI, other clients) if we make conn_type optional?
Committer