Skip to content

Conversation

travishathaway
Copy link
Contributor

@travishathaway travishathaway commented Jun 23, 2025

Description

Closes: #14949

Currently, when users run conda env create --platform=<platform> ... this will initially use the correct platform because context.subdir is being set correctly, but subsequent calls to conda env update or conda install will use erroneously use the system's platform.

This happens because we are not creating the .condarc file in the environment itself which has the subdir set correctly in it. To fix this, I simply copied over the code from conda/cli/install.py where this was being done correctly to conda/cli/main_env_create.py.

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?

@travishathaway travishathaway requested a review from a team as a code owner June 23, 2025 09:33
@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Jun 23, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 23, 2025
@travishathaway travishathaway moved this from 🆕 New to 👀 In Review in 🔎 Review Jun 23, 2025
Copy link

codspeed-hq bot commented Jun 23, 2025

CodSpeed Performance Report

Merging #14956 will degrade performances by 46.96%

Comparing travishathaway:issue-14949 (9fe198e) with main (70c0967)

Summary

❌ 1 regressions
✅ 20 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_update[libmamba-update] 2.2 s 4.1 s -46.96%

Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

I don't think writing implicitly to the config file is okay when running conda env create with --platform, at least the users should be informed about this change of behavior.

@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Approved in 🔎 Review Jun 23, 2025
@travishathaway travishathaway merged commit d3a8640 into conda:main Jun 23, 2025
74 of 75 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jun 23, 2025
@travishathaway travishathaway deleted the issue-14949 branch June 23, 2025 15:10
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.

Support target platform specification (e.g., --platform/--subdir) in conda env update and conda update commands
4 participants