CI: recreate conda env from conda-forge to avoid mixed-channel solve#19255
CI: recreate conda env from conda-forge to avoid mixed-channel solve#19255rascani wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19255
Note: Links to docs will display an error until the docs builds have been completed. ❌ 51 New Failures, 1 Pending, 1 Unrelated FailureAs of commit bf378fe with merge base e84a418 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
094a17c to
7203a62
Compare
pytorch/test-infra's setup-miniconda action pre-populates the conda env
at ${CONDA_PREFIX} with cmake=3.22, ninja=1.10, pkg-config=0.29, and
wheel=0.37 from the anaconda defaults channel. Our subsequent install
of cmake=3.31.2 from conda-forge has to reconcile two channels in one
solve, and that's been intermittently failing because conda-forge's
newer cmake needs transitive deps (libzlib>=1.3.1, rhash>=1.4.5) that
defaults' shipped versions don't satisfy. Patches that just tweak the
solver flags (--strict-channel-priority, --override-channels alone,
--update-deps) each address one symptom but expose another, because
libmamba on macOS has gaps around channel priority and in-place
upgrades that surface differently per runner class.
Tear down the pre-populated env and recreate it from conda-forge only
with --override-channels. The python version is read from the existing
env so we recreate at parity. Because we recreate at the same prefix,
${CONDA_RUN}, ${CONDA_INSTALL}, and the ~80 workflow callsites that
depend on those vars keep working unchanged. The cache layer in
setup-miniconda caches the base/clone-source rather than the per-run
env, so destroy+recreate doesn't disturb caching either.
This is the surgical short-term fix. The lasting fix is to plumb a
default-packages input through pytorch/test-infra's macos_job.yml so
we can pass default-packages: "" and skip the wasted install entirely;
that's a follow-up upstream PR.
Authored with Claude Code.
7203a62 to
bf378fe
Compare
Summary
pytorch/test-infra's setup-miniconda action pre-populates the conda env
at ${CONDA_PREFIX} with cmake=3.22, ninja=1.10, pkg-config=0.29, and
wheel=0.37 from the anaconda defaults channel. Our subsequent install
of cmake=3.31.2 from conda-forge has to reconcile two channels in one
solve, and that's been intermittently failing because conda-forge's
newer cmake needs transitive deps (libzlib>=1.3.1, rhash>=1.4.5) that
defaults' shipped versions don't satisfy. Patches that just tweak the
solver flags (--strict-channel-priority, --override-channels alone,
--update-deps) each address one symptom but expose another, because
libmamba on macOS has gaps around channel priority and in-place
upgrades that surface differently per runner class.
Tear down the pre-populated env and recreate it from conda-forge only
with --override-channels. The python version is read from the existing
env so we recreate at parity. Because we recreate at the same prefix,
${CONDA_RUN}, ${CONDA_INSTALL}, and the ~80 workflow callsites that
depend on those vars keep working unchanged. The cache layer in
setup-miniconda caches the base/clone-source rather than the per-run
env, so destroy+recreate doesn't disturb caching either.
Authored with Claude Code.
Test plan
CI