Commit af1ac9c
feat: pre-solved environments for mulled tests (#1082)
## Summary
- Pre-solves the mulled test environment on the host using `conda create
--dry-run --json`, then passes an `@EXPLICIT` spec file to the container
- The container installs from the explicit spec (no solver needed), runs
`create-env` post-processing, then executes tests
- Graceful fallback: if pre-solve fails for any reason, falls back to
the original `mulled-build build-and-test` path
- Automatically disabled when `mulled_upload_target` is set (upload
needs the Docker image produced by `mulled-build`)
- Adds `--no-presolved-mulled-test` CLI flag for opt-out
Related: #817
## Savings
60-180s per mulled test by eliminating a redundant solver run inside the
container.
## Risks
- **Medium**: `conda create --dry-run --json` output format varies
across conda versions. Robust fallback to original path mitigates this.
- **Medium**: Bypassing `mulled-build` means maintaining a parallel test
execution path. The `create-env --conda=: /usr/local` POSTINSTALL step
is replicated from the involucro wrapper.
- Backward compatible: graceful fallback ensures original behavior is
preserved on any failure.
## Test plan
- [x] Run existing test suite: `pytest test/`
- [x] Integration test: `bioconda-utils build recipes/ config.yml
--docker --mulled-test` on pyfaidx
- [x] Verify tests pass identically with and without
`--no-presolved-mulled-test`
- [x] Test fallback: presolved path failed (host/container platform
mismatch on macOS) and correctly fell back to mulled-build
- [x] Verify `mulled_upload_target` correctly disables pre-solved path
(confirmed: goes straight to mulled-build)
---------
Co-authored-by: Elmar Pruesse <epruesse@users.noreply.github.com>1 parent 3d4c9e1 commit af1ac9c
3 files changed
+212
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| 213 | + | |
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
| |||
366 | 371 | | |
367 | 372 | | |
368 | 373 | | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
| 541 | + | |
| 542 | + | |
535 | 543 | | |
536 | 544 | | |
537 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
622 | 628 | | |
623 | 629 | | |
624 | 630 | | |
| |||
658 | 664 | | |
659 | 665 | | |
660 | 666 | | |
| 667 | + | |
661 | 668 | | |
662 | 669 | | |
663 | 670 | | |
| |||
733 | 740 | | |
734 | 741 | | |
735 | 742 | | |
| 743 | + | |
736 | 744 | | |
737 | 745 | | |
738 | 746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 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 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
90 | 249 | | |
91 | 250 | | |
92 | 251 | | |
| |||
95 | 254 | | |
96 | 255 | | |
97 | 256 | | |
| 257 | + | |
98 | 258 | | |
99 | 259 | | |
100 | 260 | | |
| |||
125 | 285 | | |
126 | 286 | | |
127 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
128 | 293 | | |
129 | 294 | | |
130 | 295 | | |
| |||
139 | 304 | | |
140 | 305 | | |
141 | 306 | | |
142 | | - | |
| 307 | + | |
143 | 308 | | |
144 | 309 | | |
145 | 310 | | |
146 | 311 | | |
147 | | - | |
148 | | - | |
149 | 312 | | |
150 | 313 | | |
151 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
152 | 345 | | |
153 | 346 | | |
154 | 347 | | |
| |||
0 commit comments