Repository navigation
Cap the workers of the SFTP concurrent directory transfer test - #74888
Merged
Merged
Conversation
`store_directory_concurrently` and `retrieve_directory_concurrently` default to `os.cpu_count()` workers, and each worker opens its own SSH connection, one after another, before any transfer starts. The test's runtime therefore grows with the host's CPU count. On the self-hosted EKS runners of an earlier CI experiment `os.cpu_count()` reported 32-48 (it ignores cgroup CPU limits) and the test hit the 60s per-test timeout in 14 jobs, including on a dedicated node. Locally, 64 workers take 24s for their 128 sequential handshakes, so slower or throttled hosts cross the limit. The 32-vCPU class of the RunsOn runners (apache#74714) has the same exposure. sshd's `MaxStartups` is not involved: the connections authenticate one at a time, and 32 and 64 workers both pass locally against its default. Four workers is what the test uses on today's 4-vCPU GitHub-hosted runners, so it keeps exercising the same path whatever the host.
henry3260
approved these changes
Oct 16, 2026
SameerMesiah97
pushed a commit
to SameerMesiah97/airflow-oss-sm97
that referenced
this pull request
Oct 27, 2026
…e#74888) `store_directory_concurrently` and `retrieve_directory_concurrently` default to `os.cpu_count()` workers, and each worker opens its own SSH connection, one after another, before any transfer starts. The test's runtime therefore grows with the host's CPU count. On the self-hosted EKS runners of an earlier CI experiment `os.cpu_count()` reported 32-48 (it ignores cgroup CPU limits) and the test hit the 60s per-test timeout in 14 jobs, including on a dedicated node. Locally, 64 workers take 24s for their 128 sequential handshakes, so slower or throttled hosts cross the limit. The 32-vCPU class of the RunsOn runners (apache#74714) has the same exposure. sshd's `MaxStartups` is not involved: the connections authenticate one at a time, and 32 and 64 workers both pass locally against its default. Four workers is what the test uses on today's 4-vCPU GitHub-hosted runners, so it keeps exercising the same path whatever the host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related: #74889
As titled, required to avoid failures of
test_store_and_retrieve_directory_concurrentlywhen there's a large number of CPUs or throttled ones.AI Summary
`test_store_and_retrieve_directory_concurrently` lets the hook pick its default worker count, `os.cpu_count()`. Each worker opens its own SSH connection, one after another, before any transfer starts, so the test's runtime grows with the host's CPU count.os.cpu_count()reported 32–48 (it ignores cgroup CPU limits). The test hit the 60s per-test timeout in 14 jobs, including on a dedicated node.MaxStartupsis not involved. The connections authenticate one at a time, and 32 and 64 workers both pass against its default.Passing
workers=4keeps the test doing exactly what it does on today's 4-vCPU GitHub-hosted runners, whatever the host. The change is test-only and leaves the hook's default alone. It is a prerequisite for running CI on larger runners (see the RunsOn experiment in #74714).Checks run locally:
ruff format,ruff checkand the prek pre-commit hooks on the changed file. CI on this PR runs on GitHub-hosted runners.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines
{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.