Skip to content

Investigate option for execution API Connections datamodel for connections with no conn_type #58529

@amoghrajesh

Description

@amoghrajesh

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:

  1. Secrets backends can return connections without conn_type (backward compatible with Airflow 2)
  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:

  1. Should ConnectionResponse models allow conn_type: str | None to support secrets backend connections?
  2. What's the impact on API consumers (UI, CLI, other clients) if we make conn_type optional?

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:APIAirflow's REST/HTTP APIkind:metaHigh-level information important to the community

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions