Commit 3d4c9e1
authored
feat: eliminate redundant host-side solver run for Docker builds (#1081)
## Summary
- When building with Docker, `get_package_paths()` triggers a full
finalized conda solver run on the host via `api.render(finalize=True)`.
This is redundant because Docker's `conda-build` re-solves from scratch
anyway.
- Adds a `finalize` parameter to `get_package_paths()` and skips the
expensive finalized render when a `docker_builder` is present
- Non-finalized metas use `bypass_env_check=True`, which avoids costly
dependency resolution. As documented in `utils.py:479-480`, this does
not change the package build string.
- Adds `--no-fast-resolve` CLI flag for debugging/opt-out
## Savings
10-60s per recipe by eliminating a redundant solver invocation. For R
packages, a single solve can take 10+ minutes.
## Risks
- **Medium**: Non-finalized metas may produce slightly different build
strings if `pin_compatible` or `run_exports` affect the hash. This could
cause:
- False "not in channel" -> rebuilds something that exists (wasteful but
not incorrect)
- False "in channel" -> skips a needed build (lower risk since
`check_recipe_skippable()` already does a fast check)
- **Mitigation**: Debug logging when fast path is used;
`--no-fast-resolve` opt-out flag
- Only changes behavior when `docker_builder is not None`
## Test plan
- [x] Run existing test suite: `pytest test/`
- [x] Integration test with Docker: `bioconda-utils build recipes/
config.yml --docker` on pyfaidx
- [x] Compare build results with and without `--no-fast-resolve`
- [x] Verify built packages are identical1 parent 975acdb commit 3d4c9e1
3 files changed
+24
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
486 | 497 | | |
487 | 498 | | |
488 | 499 | | |
| |||
| 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 | | |
| |||
652 | 658 | | |
653 | 659 | | |
654 | 660 | | |
| 661 | + | |
655 | 662 | | |
656 | 663 | | |
657 | 664 | | |
| |||
726 | 733 | | |
727 | 734 | | |
728 | 735 | | |
| 736 | + | |
729 | 737 | | |
730 | 738 | | |
731 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | 1197 | | |
| |||
0 commit comments