Skip to content

Decouple Cadwyn (FastAPI/Starlette) hard dependencies from the Airflow Task SDK installation #66837

@jason810496

Description

@jason810496

Summary

Cadwyn is used within the Task SDK for API versioning and schema migration. However, Cadwyn currently carries hard dependencies on FastAPI and Starlette, which are web framework dependencies that are not needed in a standalone SDK installation (i.e. on worker nodes running tasks).

Problem

Installing the Airflow Task SDK pulls in FastAPI and Starlette transitively through Cadwyn, even in environments where no HTTP server is needed. This bloats the SDK's dependency footprint and may cause conflicts in constrained environments.

Proposed Resolution

Coordinate with the Cadwyn maintainer to explore one of the following:

  • Making FastAPI/Starlette optional extras in Cadwyn (only required when the routing/versioning middleware is used)
  • Exposing the core migration utilities (e.g. VersionChange, _migrate_response) as a dependency-free sub-package
  • Or equivalent approach agreed upon with the maintainer

Acceptance Criteria

  • Installing apache-airflow-task-sdk (or equivalent) does not pull in FastAPI or Starlette unless explicitly opted into
  • Cadwyn's schema migration functionality used by the supervisor remains fully operational

Drafted-by: Claude Code (Opus 4.7); reviewed by @jason810496 before posting

Metadata

Metadata

Assignees

Labels

AIP-108: CoordinatorChange this to an 'area:' label after AIP acceptance.AIP-108: java-sdkChange this to an 'area:' label after AIP acceptance.area:dependenciesIssues related to dependencies problemskind:featureFeature Requestspriority:lowBug with a simple workaround that would not block a release

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions