Commit 810ed2d
[apiview-stub-generator] Make package-install timeout configurable (120s -> 300s) (#16395)
* [apiview-stub-generator] Make package-install timeout configurable (120s -> 300s)
The API-stub generator installs the target package (with all runtime deps) into
an isolated venv before introspection, under a hardcoded 120s timeout. Packages
with large dependency trees can exceed this on slower CI agents even when the
install is healthy — e.g. azure-ai-agentserver-core (which pulls the Microsoft
OpenTelemetry distro, ~200 transitive packages) was observed installing in 35s
on one azsdk-pool agent and 136s on another (identical tree, pure per-agent
speed variance), failing API Review on both PRs and main.
Raise the default to 300s and allow override via APISTUB_INSTALL_TIMEOUT.
* Validate APISTUB_INSTALL_TIMEOUT: fall back to default on non-integer or non-positive values
Addresses review: a malformed env value (e.g. 'abc', '0', '-1') no longer
crashes with a raw ValueError or an immediate timeout. Invalid or non-positive
values are ignored with a warning and the 300s default is used.
* Keep default install timeout at 120s; only make it overridable
Per review feedback: preserve the previous default (120s) and provide
APISTUB_INSTALL_TIMEOUT purely as an opt-in override for pipelines whose
packages need more time. No behavior change for existing consumers.
* Bump apistub package-install timeout 120s -> 300s
Large dependency trees (e.g. the Microsoft OpenTelemetry distro) can exceed
the 120s install timeout on slower CI agents even when the install is healthy,
causing spurious API Review failures. Raise to 300s.
* ci: authenticate pip to dev feed before installing tox
The azsdk-pool CI agents no longer have direct public PyPI egress, so
'pip install tox' fails with '[Errno 1] Operation not permitted' /
'No matching distribution found for tox'. Add a PipAuthenticate@1 step so
pip (and tox's nested pip) route through the authenticated
public/azure-sdk-for-python feed, which proxies PyPI.
* ci: bump lazy-object-proxy 1.10.0 -> 1.12.0 for Python 3.13/3.14 wheels
lazy-object-proxy 1.10.0 only ships wheels for cp310-cp312. On Python
3.13/3.14 CI legs, pip fell back to building it from sdist, which triggered a
nested build-dependency install that prompted for feed auth
(User for pkgs.dev.azure.com:) and failed with EOFError. 1.12.0 publishes
prebuilt cp313 and cp314 wheels (and still cp310-cp312), so no sdist build is
needed and the 3.13/3.14 legs no longer hit the auth prompt.
* ci: fix python-tool Build stage for network-restricted agents
Two failures in the shared python-tool archetype Build stage:
1. 'Use Python 3.8' failed - the CI images now ship only Python 3.10-3.14
and 3.8 can no longer be downloaded. Bump the tooling bootstrap version
in use-python-version.yml from 3.8 to 3.10 (lowest version on the image).
2. The Build job's pip installs (tooling packaging install + Setup Python
Environment) had no feed auth, so they failed with
'[Errno 1] Operation not permitted' now that agents lack public PyPI
egress. Add a PipAuthenticate@1 step as the first step of the Build job
so PIP_INDEX_URL is set before any pip install.
* Use auth-sev-feed.yml
* update azure_test.ynl to download packages from devOps feed rather that public pypi
* Raise apistub install timeout 300s -> 1000s to diagnose slow core install
* Revert install timeout back to 300s (1000s was a diagnostic experiment)
---------
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>1 parent 69e96fa commit 810ed2d
9 files changed
Lines changed: 70 additions & 26 deletions
File tree
- eng
- common/pipelines/templates/steps
- pipelines/templates
- stages
- steps
- packages/python-packages/apiview-stub-generator
- apistub
- tests/azure_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
454 | 459 | | |
455 | 460 | | |
456 | 461 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
Lines changed: 51 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
131 | 181 | | |
132 | 182 | | |
133 | 183 | | |
| |||
136 | 186 | | |
137 | 187 | | |
138 | 188 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 189 | + | |
158 | 190 | | |
159 | 191 | | |
160 | 192 | | |
| |||
0 commit comments