feat: pre-solved environments for mulled tests#1082
Merged
epruesse merged 3 commits intobioconda:masterfrom Mar 3, 2026
Merged
feat: pre-solved environments for mulled tests#1082epruesse merged 3 commits intobioconda:masterfrom
epruesse merged 3 commits intobioconda:masterfrom
Conversation
When mulled-build runs build-and-test, it creates a new conda environment from scratch (full solve + download + install). Since the host just built the package and already knows the dependency graph, we can pre-solve on the host and pass an @explicit spec file to the container, skipping the solver entirely. Changes: - Add _generate_explicit_spec() that runs conda create --dry-run --json and generates an @explicit spec file with exact URLs + checksums - Add _test_with_explicit_spec() that runs the conda image directly with the spec file, replicating the create-env POSTINSTALL step from involucro - Add presolved parameter to test_package() (default: True) with automatic fallback to original mulled-build path on any failure - Add presolved_mulled_test parameter to build() and build_recipes() - Disable pre-solved path when mulled_upload_target is set (upload needs the Docker image produced by mulled-build) - Add --no-presolved-mulled-test CLI flag for opt-out Related: bioconda-utils issue bioconda#817 Saves 60-180s per mulled test by eliminating a redundant solver run.
Member
|
@nh13 Do you want to complete the test plan? |
Member
Author
|
Test plan completed. Tested locally with
Note: the presolved path itself can't be fully exercised locally on macOS since the host solver resolves for osx-arm64 while the container expects linux-64 packages. In CI (Linux to Linux), the presolved path would be used. The fallback guarantees correctness either way. |
johanneskoester
pushed a commit
that referenced
this pull request
Mar 4, 2026
🤖 I have created a release *beep* *boop* --- ## [4.1.0](v4.0.0...v4.1.0) (2026-03-04) ### Features * eliminate redundant host-side solver run for Docker builds ([#1081](#1081)) ([3d4c9e1](3d4c9e1)) * pre-solved environments for mulled tests ([#1082](#1082)) ([af1ac9c](af1ac9c)) ### Bug Fixes * add raise_for_status to CircleCI workflow API call ([#1083](#1083)) ([2f558ee](2f558ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
conda create --dry-run --json, then passes an@EXPLICITspec file to the containercreate-envpost-processing, then executes testsmulled-build build-and-testpathmulled_upload_targetis set (upload needs the Docker image produced bymulled-build)--no-presolved-mulled-testCLI flag for opt-outRelated: #817
Savings
60-180s per mulled test by eliminating a redundant solver run inside the container.
Risks
conda create --dry-run --jsonoutput format varies across conda versions. Robust fallback to original path mitigates this.mulled-buildmeans maintaining a parallel test execution path. Thecreate-env --conda=: /usr/localPOSTINSTALL step is replicated from the involucro wrapper.Test plan
pytest test/bioconda-utils build recipes/ config.yml --docker --mulled-teston pyfaidx--no-presolved-mulled-testmulled_upload_targetcorrectly disables pre-solved path (confirmed: goes straight to mulled-build)