[SPARK-56610][INFRA] Make JIRA connect timeout configurable in merge_spark_pr.py#55528
Open
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Open
[SPARK-56610][INFRA] Make JIRA connect timeout configurable in merge_spark_pr.py#55528zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Conversation
yaooqinn
approved these changes
Apr 24, 2026
LuciferYang
approved these changes
Apr 24, 2026
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.
What changes were proposed in this pull request?
Add a
JIRA_CONNECT_TIMEOUTenvironment variable (default3.05) indev/merge_spark_pr.py, and use it as the connect-timeout component of therequeststimeout tuple at bothjira.client.JIRA(...)call sites.Why are the changes needed?
The hardcoded 3.05-second connect timeout introduced in SPARK-55643 sits just past the standard TCP retransmission window — fine for a bare TCP connect on a direct connection, but too tight for a proxied TLS handshake (TCP connect to proxy + HTTPS
CONNECT+ TLS handshake to the target). When the script runs behind a slow HTTPS proxy,initialize_jira()fails almost immediately with:ResilientSession's internal retry loop does not recover from this, because it only catchesrequests.exceptions.ConnectionError, andReadTimeoutdoes not inherit from it.In practice, this makes
dev/merge_spark_pr.pyunusable from any environment that routes traffic through an HTTPS proxy — I cannot merge a PR from my WSL2 setup, and have to switch to another macos just for merging PRs.Exposing the timeout as an env var lets affected users raise the limit (e.g.
JIRA_CONNECT_TIMEOUT=30) without editing the script.Does this PR introduce any user-facing change?
No.
merge_spark_pr.pyis a developer tool, and the default timeout value is unchanged.How was this patch tested?
Manual test. Setting
JIRA_CONNECT_TIMEOUT=30letsdev/merge_spark_pr.pyget pastinitialize_jira()in an environment that previously failed withReadTimeoutafter ~3 s.Was this patch authored or co-authored using generative AI tooling?
Generated-by:
Claude Code (Opus 4.7)