Skip to content

Conversation

@ianhi
Copy link
Collaborator

@ianhi ianhi commented Sep 11, 2025

General Organization

For both the rust and python CI i have extracted the code quality checks (cargo fmt, pre-commit, etc...) into separate workflows. And the main CI pathways just run compilations and tests.

  • Use uv as much as possible when interacting with python

  • use sccache on the maturin build step

  • The two python steps now share a single build-wheel step

  • Fixed MinIO/Azurite health checks in both python-check and rust-ci

    • previously they always waited the whole time becuase they were hitting the wrong url.
    • This is 1 minute 30seconds saving for the rust-ci

Potential future improvement

Right now the maturin build doesn't benefit at all from the fact that we are already building the icechunk rust library separately. It feels like this should be possible, but I couldn't figure it out

Current status

I think this is basically ready. It seems to significantly speed things up. For example the python tests go from 8 minutes on a PR from before this to ~5 min on this PR. The rust ci checks are also sped up.

My one worry is that the tests that normally fail on PR due to credentials are not failing here. But I think that might be because I gained some icechunk status on github.

After merging this we will need to edit the names of the required workflows for merging. That's the cause of this

image

it's waiting for a workflow that no longer exists. We will just update that to be the "tests" or "xarray-tests" jobs

@ianhi
Copy link
Collaborator Author

ianhi commented Sep 11, 2025

Not sure what's up with this double compilation in the build wheels:

   Compiling icechunk-python v1.1.5 (/home/runner/work/icechunk/icechunk/icechunk-python)
    Finished `release` profile [optimized] target(s) in 1m 49s
📦 Built wheel for CPython 3.11 to dist/icechunk-1.1.5-cp311-cp311-manylinux_2_39_x86_64.whl
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/runner/work/icechunk/icechunk/icechunk-python/Cargo.toml
workspace: /home/runner/work/icechunk/icechunk/Cargo.toml
   Compiling pyo3-build-config v0.24.2
   Compiling pyo3-ffi v0.24.2
   Compiling pyo3-macros-backend v0.24.2
   Compiling pyo3 v0.24.2
   Compiling pyo3-macros v0.24.2
   Compiling pyo3-async-runtimes v0.24.0
   Compiling pyo3-bytes v0.2.0
   Compiling icechunk-python v1.1.5 (/home/runner/work/icechunk/icechunk/icechunk-python)

@ianhi
Copy link
Collaborator Author

ianhi commented Sep 11, 2025

55ebe1a (#1222)

Seems to be good for a 30second time save every run. and is also a fully human brain generated commit :)

@ianhi ianhi changed the title Split CI workflows for better parallelization and separation of concerns Split CI workflows for better parallelization and separation of concerns [EAR-2135] Sep 11, 2025
@ianhi ianhi marked this pull request as ready for review September 11, 2025 22:12
Copy link
Collaborator

@paraseba paraseba left a comment

Choose a reason for hiding this comment

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

This looks great @ianhi . Can we use --workspace everywhere to run over all project instead of passing explicit -p foo (we are missing one)


- name: Run clippy linting
run: |
just lint -p icechunk -p icechunk-python
Copy link
Collaborator

@paraseba paraseba Sep 12, 2025

Choose a reason for hiding this comment

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

we should add -p icechunk-macros everywhere too. In fact, I think there is --workspace to do this more maintainable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice call!

@ianhi ianhi force-pushed the ci-split-workflows branch from 134c2ef to 38ad79d Compare September 12, 2025 02:48
ianhi and others added 14 commits September 11, 2025 22:49
- Created dedicated code-quality.yaml for formatting, linting, and doc tests
- Created separate dependency-check.yaml for cargo-deny security checks with weekly scheduling
- Updated rust-ci.yaml to focus purely on testing by removing quality checks
- Added separate examples step in rust-ci for clearer failure reporting
- Enables better parallelization and clearer separation between testing and quality checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The Rust linting for icechunk-python is now handled by the dedicated
code-quality workflow, which provides more comprehensive coverage by
checking both icechunk and icechunk-python packages.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Removed duplicate pre-commit step from python-check workflow
- Added comprehensive pre-commit checks to code-quality workflow using existing .pre-commit-config.yaml
- Skips Rust hooks in pre-commit since they're handled separately with just commands
- Now covers all quality checks: Python formatting/linting, file checks, actionlint, codespell, etc.
- Maintains complete quality coverage while properly separating concerns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Added UV setup with caching and proper working directory
- Use uv sync to create environment and install base dependencies
- Install built wheel with test dependencies using UV pip
- Run pytest with UV run to use the managed environment
- Fixes "pytest: command not found" error by ensuring proper installation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Create shared build-wheels job to eliminate duplicate wheel building
- Split test and xarray-backends jobs to run in parallel after build
- Add uv package manager to all Python jobs for consistency
- Separate install and test steps for better debugging
- Both test jobs now use artifacts from shared build step

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ianhi ianhi force-pushed the ci-split-workflows branch from 38ad79d to 2828477 Compare September 12, 2025 02:51
@ianhi
Copy link
Collaborator Author

ianhi commented Sep 12, 2025

This is ready now! I will merge in the morning when I have more brainpower. So I can immediately follow up and approriately modify the branch protection rules

@paraseba
Copy link
Collaborator

This is ready now! I will merge in the morning when I have more brainpower. So I can immediately follow up and approriately modify the branch protection rules

perfect, lmk if you need help merging because of that pending status

@ianhi
Copy link
Collaborator Author

ianhi commented Sep 12, 2025

image I seem to be ok!

@ianhi ianhi merged commit 069fdba into main Sep 12, 2025
14 checks passed
@ianhi ianhi deleted the ci-split-workflows branch September 12, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants