Skip to content

Support connection-test workloads in the AWS executors - #75834

Open
anishgirianish wants to merge 3 commits into
apache:mainfrom
anishgirianish:aws-connection-test-workload
Open

anishgirianish wants to merge 3 commits into
apache:mainfrom
anishgirianish:aws-connection-test-workload

Conversation

@anishgirianish

@anishgirianish anishgirianish commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Adds TEST_CONNECTION workload support to the ECS, Batch and Lambda executors so async connection tests (#62343) can run on them.

Prerequisite for #68113.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Fable 5.1) following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@anishgirianish
anishgirianish force-pushed the aws-connection-test-workload branch from 0a722cb to b2841d1 Compare November 13, 2026 23:59
if AIRFLOW_V_3_4_PLUS:
supported_workload_types: frozenset[WorkloadType] = frozenset(
{WorkloadType.EXECUTE_TASK, WorkloadType.EXECUTE_CALLBACK}
{WorkloadType.EXECUTE_TASK, WorkloadType.EXECUTE_CALLBACK, WorkloadType.TEST_CONNECTION}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test it end to end on ECS and Batch? By default the reaper fails a connection test still queued after 90 seconds (timeout + grace). Starting a Fargate task, or a Batch job when the compute environment is scaled down to 0, can take longer than that, so the test would fail even though the connection works. Should we at least document it?

self.execute_async(key=key, command=command, queue=None)
self.running.add(key)

elif AIRFLOW_V_3_3_PLUS and isinstance(workload, workloads.TestConnection):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the reaper fails a stale test it calls fail_connection_test, and the base version only clears executor_queues and running. If the workload is still sitting in pending_workloads (RunTask being retried with backoff, or throttled), we'll still launch a container later for a test that's already FAILED. The Execution API will just 409 it, so it's only wasted compute, but LocalExecutor overrides fail_connection_test for this reason. Do you think a small override here (and in Batch/Lambda) that drops pending entries for that key is worth it?

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:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants