Skip to content

Migrate CI to Pixi - #12389

Merged
crusaderky merged 9 commits into
dask:mainfrom
crusaderky:pixi
May 21, 2026
Merged

crusaderky merged 9 commits into
dask:mainfrom
crusaderky:pixi

Conversation

@crusaderky

@crusaderky crusaderky commented May 13, 2026 •

Copy link
Copy Markdown
Collaborator

Replace conda environments with pixi.

This PR:

  • drastically simplifies deployment for developers, particularly when juggling multiple environments
  • drastically improves reproducibility between CI and desktop
  • speeds up the 3.10 environment by 30 minutes
  • prevents CI from failing overnight - with the exception of the upstream workflows, which retain the old behaviour by design

Functional changes

  • The Tests workflow is still triggered on schedule in order to detect test flakiness, but is no longer affected by upstream changes.

  • ⚠️ The Tests workflow no longer automatically tracks the distributed git tip. ⚠️ If a PR in distributed breaks something in dask/dask CI, you will still notice it in the Upstream workflow.

  • Removed the pandas-nightly workflow. Instead, the Upstream workflow now runs on all PRs.

  • The Upstream workflow now has a matrix with two runs:

    • nightly (nightly wheels and git tip of key dependencies)
    • python 3.14 (all latest releases of all dependencies).

    Upstream / py314 differs from Tests / py314 as Tests uses the lockfile, meaning dependency versions don't change on their own, whereas Upstream throws out the lockfile, getting all latest and greatest packages as soon as they are released. In other words, Upstream / py314 replicates the behaviour of the old Tests workflow.

  • Repaired the Conda build workflow, which has been broken for some time. Now Conda build runs on all PRs (takes under 3 minutes).

  • Tweaked the triggers of some CI jobs for sanity

Quirks

  • doctests had never been updated since the upgrade to numpy 2.0 (which changed np.generic.__repr__, so e.g. sum(arr) now prints np.int64(123) instead of just 123. Those doctests started failing, as they should. I have no clue why they don't fail in the old CI.

Follow-ups

  • Migrate CI to pixi distributed#9276
  • Migrate test report to pixi (depends on dask/distributed)
  • Add pixi.toml to dask/partd and dask/zict (short of a full migration to pixi) and reintroduce their git tips to the nightly environment. This is low priority as these packages barely see any movement nowadays.
  • Resurrect PySpark tests #12410
  • Run a new pixi task in CI to build and validate pypi wheels
  • Use pixi to manage linters
  • Use pixi to automate docs building locally
  • Use pixi to run with cupy (no CI; only local)

Known issues

  • pixi currently has poor support for SCM versioning. There are a few workarounds in this PR.
  • github does not offer a way to hide line counts in lockfiles. This annoyingly causes bugous line counts (e.g. 51k lines in this PR!) whenever pixi.lock changes. For clarity, this is an issue shared by all package managers for all languages which use a lock file.
  • it looks like, on Windows, the python interpreter has not fully shut down when cleanup starts; this in turn causes cleanup to fail. Added a workaround to skip cleanup.

@crusaderky
crusaderky marked this pull request as draft May 13, 2026 16:22
@github-actions

github-actions Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     19 files       19 suites   5h 26m 34s ⏱️
 18 290 tests  17 026 ✅  1 264 💤 0 ❌
281 456 runs  240 917 ✅ 40 539 💤 0 ❌

Results for commit ee8aa93.

♻️ This comment has been updated with latest results.

@crusaderky
crusaderky force-pushed the pixi branch 4 times, most recently from da286d2 to b9fa9bc Compare May 14, 2026 12:33
@crusaderky crusaderky added the tests Unit tests and/or continuous integration label May 14, 2026
@crusaderky
crusaderky force-pushed the pixi branch 2 times, most recently from ccdd38f to f5524ad Compare May 14, 2026 15:59
Comment on lines -77 to -82
- name: Setup Java
uses: actions/setup-java@v5
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: prefix-dev/setup-pixi@v0
with:
distribution: "zulu"
java-version: "11"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed pyspark. All its tests were skipped. I'm going to re-add it and unskip some tests in a follow-up.

PARALLEL: "true"
COVERAGE: "true"
ARRAYEXPR: ${{ matrix.array-expr }}
HDF5_USE_FILE_LOCKING: "FALSE"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed this flag. I can't observe any difference in h5py tests.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Read continuous_integration/pixi-recipes/README.md below

Comment thread dask/array/blockwise.py
>>> z = blockwise(sequence_dot, '', a, 'i', b, 'i', dtype='f8')
>>> z.compute()
250
np.int64(250)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Left is correct with NumPy 1.x. Right is correct with NumPy >=2.0.
I cannot understand how the tests could be green in CI before (they were running with numpy 2.4).

Comment thread dask/array/routines.py
# remove 0-sized chunks
new_chunks = new_chunks[new_chunks > 0]
return tuple(new_chunks)
return tuple(new_chunks.tolist())

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

return tuple[int, ...] instead of tuple[np.int64, ...]

Comment thread dask/tests/test_ci.py
not os.environ.get("UPSTREAM_DEV"),
reason="Only check for dev packages in `upstream` CI build",
)
def test_upstream_packages_installed():

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This test made sense considering how brittle the previous CI workflow was. It doesn't anymore.

Comment thread docs/source/develop.rst
Comment on lines +338 to 339
conda create -n daskdocs -c conda-forge python=3.14
conda activate daskdocs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This should be migrated to pixi in a follow-up.

Comment thread pixi.toml Outdated
Comment on lines +34 to +36
# DNM
# distributed = { git = "https://github.com/dask/distributed" }
distributed = { git = "https://github.com/crusaderky/distributed", rev = "pixi" }

@crusaderky crusaderky May 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

DNM
This points to dask/distributed#9264

@crusaderky
crusaderky marked this pull request as ready for review May 14, 2026 21:25
@crusaderky crusaderky changed the title WIP migrate CI to Pixi Migrate CI to Pixi May 14, 2026
@crusaderky

Copy link
Copy Markdown
Collaborator Author

@dask/maintenance this is ready for review!

@crusaderky
crusaderky merged commit 991543b into dask:main May 21, 2026
24 of 25 checks passed
@crusaderky
crusaderky deleted the pixi branch May 21, 2026 15:08
@crusaderky crusaderky mentioned this pull request May 25, 2026
1 of 6 tasks
@Hofer-Julian

Copy link
Copy Markdown

This is very cool @crusaderky!

Please let us know when you hit roadblocks on your journey to moving to Pixi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Unit tests and/or continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants