Skip to content

Show target platform instead of host in cross-platform export#911

Merged
jezdez merged 5 commits intoconda:mainfrom
costajohnt:fix/cross-platform-display
Apr 27, 2026
Merged

Show target platform instead of host in cross-platform export#911
jezdez merged 5 commits intoconda:mainfrom
costajohnt:fix/cross-platform-display

Conversation

@costajohnt
Copy link
Copy Markdown
Contributor

Summary

  • Use self.subdirs instead of context.subdir in the progress message during cross-platform lockfile export

Why

When running conda export --lockfile --platform linux-64 from macOS, the progress spinner displays "Platform: osx-arm64" for every target platform solve instead of the actual target being solved (e.g., "linux-64", "win-64").

The fix uses the same self.subdirs pattern already used on line 130 for init_libmamba_context, which correctly passes the target platform.

Verification

One-line change. The existing pattern at line 130 (next(s for s in self.subdirs if s != "noarch")) validates this approach.

Fixes #919

@costajohnt costajohnt requested a review from a team as a code owner April 16, 2026 02:50
@github-project-automation github-project-automation Bot moved this to 🆕 New in 🔎 Review Apr 16, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Apr 16, 2026
@dholth
Copy link
Copy Markdown
Contributor

dholth commented Apr 16, 2026

I like it. We might add a test; resiliency against self.subdirs with no noarch value; and definitely a news/ item.

@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Approved in 🔎 Review Apr 23, 2026
The progress message during cross-platform lockfile export always
displayed context.subdir (the host platform) instead of the actual
target platform being solved. Use self.subdirs to display the correct
target, matching the pattern already used for init_libmamba_context.

Fixes conda/conda#15920
@jezdez jezdez force-pushed the fix/cross-platform-display branch from 796f78b to 47b576b Compare April 23, 2026 10:12
Combines the cross-platform target and noarch-only fallback cases into
a single parameterized test to reduce duplication.
@jezdez jezdez enabled auto-merge (squash) April 24, 2026 08:43
@jezdez jezdez disabled auto-merge April 24, 2026 08:43
@jezdez jezdez changed the title fix: show target platform instead of host in cross-platform export Show target platform instead of host in cross-platform export Apr 24, 2026
@jezdez jezdez enabled auto-merge (squash) April 24, 2026 08:44
@jezdez
Copy link
Copy Markdown
Member

jezdez commented Apr 24, 2026

Blocked by conda-forge/pytest-codspeed-feedstock#25

@jezdez jezdez moved this from ✅ Approved to 🛑 Blocked in 🔎 Review Apr 24, 2026
@costajohnt
Copy link
Copy Markdown
Contributor Author

Heads up @jezdez, the feedstock PR you flagged (conda-forge/pytest-codspeed-feedstock#25) merged on 2026-04-24 so the aarch64 jobs should be unblocked now. I pushed an empty commit (90a1af1) to retrigger CI, but the Tests workflow is sitting at action_required and needs a maintainer to approve it. Mind kicking it off when you have a sec?

@jezdez jezdez merged commit 5f35601 into conda:main Apr 27, 2026
75 checks passed
@github-project-automation github-project-automation Bot moved this from 🛑 Blocked to 🏁 Done in 🔎 Review Apr 27, 2026
@costajohnt costajohnt deleted the fix/cross-platform-display branch April 27, 2026 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

Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

Multi-platform lockfile exports show the incorrect platform

4 participants