Commit b6b550f
committed
TECH_DEBT: Bound the HTTP calls in get_deployed_commit.py with a timeout
Neither urlopen call passed a timeout, and the script never sets a global socket
default, so both used urlopen's default of blocking indefinitely. An unresponsive
/api/info endpoint or GitHub API would hang the Summarize job until the Azure DevOps
job timeout killed it, rather than failing the step with a usable error.
- Add an HTTP_TIMEOUT_SECONDS constant of 30 seconds
- Pass it to the /api/info request and the GitHub commits request, so both share the
same budget
A timeout on the /api/info call raises into the existing handler and exits through
fail(); a timeout while resolving the full hash prints the existing warnings and
leaves FromCommit as the short hash. Verified against qa2 that the normal path is
unaffected: 78b98b4 still resolves to 78b98b4.1 parent de90080 commit b6b550f
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
81 | | - | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
112 | | - | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
0 commit comments