Skip to content

Migrate from pip to uv and upgrade Python 3.9 to 3.11#76

Open
harshavemula-ua wants to merge 7 commits intomainfrom
UV-package
Open

Migrate from pip to uv and upgrade Python 3.9 to 3.11#76
harshavemula-ua wants to merge 7 commits intomainfrom
UV-package

Conversation

@harshavemula-ua
Copy link
Collaborator

Summary

  • Replace pip with uv in Dockerfile.datastream-deps and Dockerfile.datastream
  • Upgrade Python 3.9 to 3.11 in Docker images and CI workflows
  • Add python3→python3.11 symlink for datastream script compatibility
  • Remove buildx/QEMU from x86 workflows (prevents stale image cache issues)
  • Fix ARM workflow tmpfs issue (docker prune + runner.temp paths)

Test plan

  • x86 unit tests (build_test_ds_x86)
  • ARM unit tests (build_test_ds_arm)
  • x86 integration (integration_ds_fp_x86)
  • Python test workflows (validation, configuration, bmi, model realizations, troute)

- Replace pip with uv in Dockerfile.datastream-deps and Dockerfile.datastream
- Install python3.11 instead of python3.9 in deps image
- Add python3->python3.11 symlink in datastream image
- Update setup.cfg python_requires to >=3.11
- Update 5 Python test workflows to use Python 3.11
- Remove buildx from x86 build/integration workflows
- Fix ARM workflow tmpfs issue (docker prune + runner.temp paths)
Buildx stores images in its own cache, not the local Docker daemon,
causing builds to pull old images from Docker Hub instead of using
locally-built ones (results in uv: command not found).
Workflows that only built datastream were pulling the old
datastream-deps image from Docker Hub (no uv/python3.11).
Only build datastream-deps from source when its Dockerfile has
changed. Otherwise pull from Docker Hub to save CI time,
especially important for ARM builds with compiled deps.
Use PR-aware git diff (base.sha...head.sha) with fetch-depth: 0
instead of origin/main...HEAD which fails in shallow clones.
Also upgrade checkout v2 to v4 in ngiab and teehr workflows.
The git diff used HEAD~1 which fails in shallow clones, causing
sed to remove ALL Docker build commands from the execution JSON.
The Step Function then ran with no builds and falsely reported success.

Replace with PR-aware git diff SHAs and add fetch-depth: 0.
github.ref_name returns '76/merge' for PRs which is not a valid
git branch. Use github.head_ref to get the actual source branch
name so the EC2 instance can clone the correct branch.
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.

1 participant