Skip to content

Commit aa41e23

Browse files
committed
[ZEPPELIN-6194] Fix flaky Conda environment setup by using strict channel priority in GitHub Actions
### What is this PR for? **Problem Summary:** The interpreter-test-non-core (11) job within the core GitHub Actions workflow occasionally fails during the Conda environment setup phase. These failures are non-deterministic (flaky) and do not correlate with specific code changes, indicating an environment-related root cause. **Details:** The failure typically occurs when resolving dependencies using Conda, with the following error observed: ```bash python: /croot/libsolv-suite.../rules.c:261: solver_addrule: Assertion `!p2 && d > 0' failed. ``` This assertion failure is triggered by Conda's dependency resolver (libsolv) when it encounters unresolved or conflicting constraints. Previously, the workflow used channel-priority: true, which corresponds to flexible priority mode. This allowed mixing packages from both conda-forge and defaults, potentially leading to dependency conflicts. **Resolution:** The Conda configuration has been updated to use channel-priority: strict, ensuring that all dependencies are resolved from conda-forge unless unavailable: ```bash with: ... channel-priority: strict ... ``` After this change, the flaky behavior during environment setup was no longer observed in repeated runs. ### What type of PR is it? Bug Fix ### Todos * [x] - Update `setup-miniconda` configuration ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN/ZEPPELIN-6194 ### How should this be tested? * This should be validated by re-running the `core` workflow multiple times to confirm that the flaky behavior in `interpreter-test-non-core (11)` no longer occurs during Conda environment setup. ### Screenshots (if appropriate) N/A ### Questions: * Does the license files need to update? No. * Is there breaking changes for older versions? No. * Does this needs documentation? No. Closes apache#4937 from ParkGyeongTae/fix-conda-channel-priority. Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
1 parent 2274f53 commit aa41e23

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/core.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
environment-file: testing/env_python_3.9_with_R.yml
7575
python-version: 3.9
7676
channels: conda-forge,defaults
77-
channel-priority: true
77+
channel-priority: strict
7878
auto-activate-base: false
7979
use-mamba: true
8080
- name: Make IRkernel available to Jupyter
@@ -124,7 +124,7 @@ jobs:
124124
environment-file: testing/env_python_3_with_R_and_tensorflow.yml
125125
python-version: 3.9
126126
channels: conda-forge,defaults
127-
channel-priority: true
127+
channel-priority: strict
128128
auto-activate-base: false
129129
use-mamba: true
130130
- name: verify interpreter
@@ -166,7 +166,7 @@ jobs:
166166
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
167167
python-version: ${{ matrix.python }}
168168
channels: conda-forge,defaults
169-
channel-priority: true
169+
channel-priority: strict
170170
auto-activate-base: false
171171
use-mamba: true
172172
- name: Make IRkernel available to Jupyter
@@ -221,7 +221,7 @@ jobs:
221221
environment-file: testing/env_python_3_with_R.yml
222222
python-version: 3.9
223223
channels: conda-forge,defaults
224-
channel-priority: true
224+
channel-priority: strict
225225
auto-activate-base: false
226226
use-mamba: true
227227
- name: Make IRkernel available to Jupyter
@@ -277,7 +277,7 @@ jobs:
277277
environment-file: testing/env_python_3_with_flink_${{ matrix.flink }}.yml
278278
python-version: ${{ matrix.python }}
279279
channels: conda-forge,defaults
280-
channel-priority: true
280+
channel-priority: strict
281281
auto-activate-base: false
282282
use-mamba: true
283283
- name: run tests for flink
@@ -325,7 +325,7 @@ jobs:
325325
environment-file: testing/env_python_3_with_R.yml
326326
python-version: 3.9
327327
channels: conda-forge,defaults
328-
channel-priority: true
328+
channel-priority: strict
329329
auto-activate-base: false
330330
use-mamba: true
331331
- name: Make IRkernel available to Jupyter
@@ -372,7 +372,7 @@ jobs:
372372
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
373373
python-version: ${{ matrix.python }}
374374
channels: conda-forge,defaults
375-
channel-priority: true
375+
channel-priority: strict
376376
auto-activate-base: false
377377
use-mamba: true
378378
- name: Make IRkernel available to Jupyter
@@ -432,7 +432,7 @@ jobs:
432432
environment-file: testing/env_python_3.9_with_R.yml
433433
python-version: 3.9
434434
channels: conda-forge,defaults
435-
channel-priority: true
435+
channel-priority: strict
436436
auto-activate-base: false
437437
use-mamba: true
438438
- name: Make IRkernel available to Jupyter

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
environment-file: testing/env_python_3_with_R.yml
120120
python-version: 3.9
121121
channels: conda-forge,defaults
122-
channel-priority: true
122+
channel-priority: strict
123123
auto-activate-base: false
124124
use-mamba: true
125125
- name: Make IRkernel available to Jupyter

0 commit comments

Comments
 (0)