Skip to content

Cover remaining response-mapping client methods in contract tests - #77190

Open
jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:test-task-sdk-client-contract-coverage
Open

jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:test-task-sdk-client-contract-coverage

Conversation

@jason810496

Copy link
Copy Markdown
Member

Why

#77146 added contract tests for Task SDK client methods that interpret a response. task_instances.start, dag_runs.trigger and assets.get also do, but have no test yet.

What

  • Test that task_instances.start raises TaskAlreadyRunningError for a task running or restarting on another host, and a plain ServerResponseError for a finished one.
  • Test that dag_runs.trigger returns DAGRUN_ALREADY_EXISTS on a repeat trigger, and falls back to clear with reset_dag_run.
  • Test that assets.get returns ASSET_NOT_FOUND for a missing name or uri.
  • Add a stored-null case for the asset state store, matching the task state store.
  • Add a guard test that fails when a client method catches ServerResponseError but no contract test calls it.

Was generative AI tooling used to co-author this PR?

Add contract tests for task_instances.start, dag_runs.trigger and
assets.get, and a stored-null case for the asset state store. A guard
test fails when a client method catches ServerResponseError but no
contract test calls it.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Nov 17, 2026
@jason810496 jason810496 self-assigned this Nov 17, 2026
@jason810496
jason810496 marked this pull request as ready for review November 17, 2026 06:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant