Skip to content

fix context variables bug, add test for variants in sources #66

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

Merged
merged 6 commits into from
May 14, 2025

Conversation

ytausch
Copy link
Contributor

@ytausch ytausch commented Jan 22, 2025

Currently, render_all_sources does not render variables in source URLs defined by variant variables (as opposed to variables defined in the source section). However, rattler-build supports variant variables in the source section (see, e.g., https://github.com/conda-forge/polars-feedstock/pull/303/checks?check_run_id=35876450902).

Does it make sense to support variant variables here too? This would enable the autotick-bot to parse such recipes.

@@ -125,7 +125,7 @@ def render(template: str | list[str], context: dict[str, str]) -> str | list[str
if isinstance(template, list):
return [cast(str, render(t, context)) for t in template]
template = env.from_string(template)
return template.render(context_variables)
return template.render(context)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was actually a bug?

@ytausch
Copy link
Contributor Author

ytausch commented Feb 21, 2025

@wolfv any updates here?

ytausch added 2 commits May 14, 2025 17:39
(was already disabled in testing)
@ytausch
Copy link
Contributor Author

ytausch commented May 14, 2025

@wolfv, could you approve the workflows again? I didn't change anything about the non-mypy tests from the last CI run, they worked just fine locally...

@ytausch ytausch changed the title support variant variables in sources fix context variables bug, add test for variants in sources May 14, 2025
@ytausch
Copy link
Contributor Author

ytausch commented May 14, 2025

The CI should go through now. Since you @minrk correctly pointed out that the tests run through without the modification, let's still keep the bug fix and the additional test.

@wolfv wolfv merged commit 82c388e into prefix-dev:main May 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants