Port v1 recipe support to py-rattler-build#5924
Open
jsmolic wants to merge 29 commits intoconda:mainfrom
Open
Conversation
jaimergp
reviewed
Feb 17, 2026
jaimergp
reviewed
Feb 17, 2026
jaimergp
reviewed
Feb 17, 2026
jaimergp
reviewed
Feb 17, 2026
jaimergp
reviewed
Feb 17, 2026
jaimergp
reviewed
Feb 17, 2026
2 tasks
9ffa6ce to
db7d96e
Compare
c4a2035 to
25d657f
Compare
351d00f to
4fc24f5
Compare
2 tasks
jaimergp
reviewed
Mar 6, 2026
Contributor
jaimergp
left a comment
There was a problem hiding this comment.
Some comments about docstrings and default values, and I'm also curious about failure modes.
jaimergp
reviewed
Mar 6, 2026
jaimergp
reviewed
Mar 6, 2026
03910f9 to
b01a62c
Compare
issues rattler-build debug support has been dropped in prefix-dev/rattler-build@c607abf due to the awkward implementation. It is going to be implemented properly with the new API so we can readd debug support once the code will make it into rattler-build source.
It has been suggested that moving these definitions out of process_recipes function makes more sense. The drawback is that we won't be able to support the experimental staging outputs because we need to be inspect outputs after loading the recipe file. This should be documented as a limitation of the current implementation. Once the staging outputs are properly supported in rattler-build we can come back and implement this in conda-build.
We are going to initially simply fork py-rattler-build's progress callback and pass the level and messages to conda's logging
We can't use it in py-rattler-build to increase verbosity
py-rattler-build does not auto discover recipe variants so we don't need to anything about this
Use py-rattler-build's Package API to run the tests. Use the test output to report it back when tests fail in the build summary.
- This adds the initial v1 recipes test file
This commit adds dataclasses for easier storing and reporting recipe and output build results. We can use them to store info during the build process such as recipe/output name, success status and error message if any; and use it to re-raise CondaBuildUserError in the end and report a meaningful build summary.
c9bcb9d to
5655d49
Compare
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.
Closes: #5891
Closes: #5892
Closes: #5893
Description
This PR continues the work started in #5880 replacing the
rattler-buildCLI subprocess calls with the new py-rattler API.It currently supports rendering and building v1 packages. Support for
conda-debugwas removed due to issues with the debug API; which has since been refactored in py-rattler and will be integrated in a subsequent PR to reduce the complexity in this one.Py-rattler API documentation is available here, but this summary describes how the API is used within this PR for easier review:
run_rattler()andprocess_recipe()functions.run_rattler()initializes configuration variables based on the values stored inargparse.NamespaceandConfigobjects. It delegates recipe processing to a separate function and handles the build summary reporting at the end.ToolConfiguration, whilePlatformConfigandRenderConfigdefine platform-specific settings and rendering behavior, respectively.VariantConfig.from_file()method, respecting the order in which they are stacked.process_recipes()performs loading, rendering, build and testing the recipe. Recipes are loaded withStage0Recipe.from_file(), rendered withrecipe.render()and build withvariant.run_build(). If enabled, testing runs after the build to follow v0 recipe behavior inconda-build.Progress reporting
Py-rattler uses the
ProgressCallbackprotocol for progress reporting, with some built-in implementations and options to define custom callbacks. This PR integratesSimpleProgressCallbackand forwards the event levels and messages to conda’s logging system. This implementation is minimal but additional UI improvements are expected to be added in future versions.Build results and summary
Build results are stored in dataclasses that contain recipe and output info about build status and error messages. Each
process_recipe()call returns aRecipeResultobject containing all relevant build summary details. Short summary is displayed upon completion, displaying per-recipe and per-output build results along with any errors if present.Limitations/features currently not implemented:
conda-debugsupport, will be added in a separate PRstagingoutput for split builds in the v1 recipe format ceps#102Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?