Skip to content

Fix platform config values for v1 recipes - #6015

Merged
jaimergp merged 5 commits into
conda:mainfrom
jsmolic:v1-platform-fix
Jul 7, 2026
Merged

Fix platform config values for v1 recipes#6015
jaimergp merged 5 commits into
conda:mainfrom
jsmolic:v1-platform-fix

Conversation

@jsmolic

@jsmolic jsmolic commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

The code is currently trying to set platform configuration values by checking config.variant object which is not valid as we are not loading config files through conda-build's mechanism and any configuration value will not get applied but rather fall back to the default config.subdir. Fix this by obtaining the settings from the variant config loaded in the rattler compat code.
While at it, cleanup redundant command check in run_rattler().

Description

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@jsmolic
jsmolic requested a review from a team as a code owner June 17, 2026 10:48
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Jun 17, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 17, 2026

@beckermr beckermr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test suite apparently didn't catch what appears to be a pretty fundamental issue here. I think we should add tests specifically for this error.

@jsmolic

jsmolic commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

The test suite apparently didn't catch what appears to be a pretty fundamental issue here. I think we should add tests specifically for this error.

Yes, I'm working on a test for this atm

@beckermr

Copy link
Copy Markdown
Contributor

Ahh sorry. I thought this was ready for review!

@codspeed-hq

codspeed-hq Bot commented Jun 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing jsmolic:v1-platform-fix (815c8fc) with main (e6334c7)

Open in CodSpeed

@danyeaw danyeaw moved this from Sorting ⚙️ to In Progress 🏗️ in conda Roadmap and Sprint Planning Jun 17, 2026
@jsmolic jsmolic moved this from In Progress 🏗️ to In review 🔍 in conda Roadmap and Sprint Planning Jun 22, 2026
Comment thread conda_build/_rattler_build/compat.py Outdated
@jsmolic
jsmolic force-pushed the v1-platform-fix branch 4 times, most recently from dc5b948 to dbda7b3 Compare June 23, 2026 12:53

@ForgottenProgramme ForgottenProgramme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@jaimergp

jaimergp commented Jul 2, 2026

Copy link
Copy Markdown
Member

AFAIK, rattler-build does not read target_platform from CBC files. e.g. see conda-forge/conda-forge-bot#6274

Is VariantConfig generic enough to parse it, or does it ignore it?

@jsmolic

jsmolic commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

AFAIK, rattler-build does not read target_platform from CBC files. e.g. see conda-forge/conda-forge-bot#6274

Is VariantConfig generic enough to parse it, or does it ignore it?

Yes, I know that the platform config settings will be ignored there if it's attempted with the CLI as it gives a warning.

VariantConfig on the other hand can parse the settings from the cbc file and then we just read and forward those values to PlatformConfig

Comment thread conda_build/_rattler_build/compat.py Outdated
Comment thread 1 Outdated
@jsmolic
jsmolic force-pushed the v1-platform-fix branch from d4223ec to 546d675 Compare July 7, 2026 09:53
jsmolic added 2 commits July 7, 2026 13:37
The code is currently trying to set platform configuration values by
checking `config.variant` object which is not valid as we are not
loading config files through conda-build's mechanism. Fix this by
obtaining the settings from the variant config loaded in the rattler
compat code.
While at it, cleanup redundant command check in `run_rattler()`.
@jsmolic
jsmolic force-pushed the v1-platform-fix branch from 456c869 to 687b5eb Compare July 7, 2026 11:37
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Approved in 🔎 Review Jul 7, 2026
@jaimergp
jaimergp merged commit abcbaeb into conda:main Jul 7, 2026
43 of 45 checks passed
@github-project-automation github-project-automation Bot moved this from In review 🔍 to Done 💪🏾 in conda Roadmap and Sprint Planning Jul 7, 2026
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jul 7, 2026
@jsmolic
jsmolic deleted the v1-platform-fix branch July 7, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants