Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with python_min is undefined in PRs with multiple packages #28445

Open
Saransh-cpp opened this issue Dec 4, 2024 · 1 comment · May be fixed by #28461
Open

Build fails with python_min is undefined in PRs with multiple packages #28445

Saransh-cpp opened this issue Dec 4, 2024 · 1 comment · May be fixed by #28461
Labels

Comments

@Saransh-cpp
Copy link
Member

Bug:

At the moment, you can skip specifying set python_min... at the top of the yaml file if your package is strictly not Python 3.10+, but the CI fails if -

  1. you do not specify the value for python_min, and
  2. your PR has multiple interdependent packages.

After some digging, I am confident that the failure does not depend on the presence or absence of noarch, instead, it happens with every PR having multiple packages. For instance, see the failures and discussions in #28405 and #28431.

cc: @conda-forge/staged-recipes

@Saransh-cpp Saransh-cpp added the bug label Dec 4, 2024
@d70-t d70-t mentioned this issue Dec 5, 2024
10 tasks
@d70-t
Copy link

d70-t commented Dec 5, 2024

I don't have a full explanation for this yet, but this might be a clue: if I understood this correctly, the metadata are rendered using this function:

def _get_or_render_metadata(meta_file_or_recipe_dir, worker, finalize, config=None):

Now _get_or_render_metadata can be called from two different sites, depending wether the rendering is triggered through an actual build, or just the check if it is buildable, e.g. in case there are two newly added packages packages A and B, where A depends on B. If A is attempted to be built first, the build script for A will try to determine if B could be built. In this case, it will render the metadata for B though the _buildable function.

Now remarkably when _get_or_render_metadata is called from _buildable, there's no config argument passed along:

for (m, _, _) in _get_or_render_metadata(os.path.join(recipes_dir,

whereas when _get_or_render_metadata is called from add_recipe_to_graph, there is a config argument:

rendered = _get_or_render_metadata(recipe_dir, worker, config=config, finalize=finalize)

I didn't yet figure out if this missing config argument is where python_min would have to be passed though...

d70-t added a commit to d70-t/staged-recipes that referenced this issue Dec 5, 2024
_get_or_render_metadata is called from two sites, but when called from
_buildable, the config argument was not passed along.

Fixes conda-forge#28445
@claudiushaag claudiushaag mentioned this issue Dec 12, 2024
10 tasks
chrisburr pushed a commit to chrisburr/staged-recipes that referenced this issue Dec 17, 2024
_get_or_render_metadata is called from two sites, but when called from
_buildable, the config argument was not passed along.

Fixes conda-forge#28445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants