Skip to content

Commit cb31976

Browse files
committed
fix(ci): remove --system flag from uv pip install commands
The --system flag causes uv to install packages into the system Python instead of the virtual environment created by 'uv sync'. This was causing CI failures because: 1. setup-python action runs 'uv sync' creating .venv/ 2. protobuf/kfp-k8s actions used 'uv pip install --system' installing to system Python, not the venv 3. 'uv run pytest' runs in .venv/ which lacked those packages Changes: - Remove redundant uv setup from protobuf and kfp-k8s actions (now provided by setup-python action) - Remove --system flag from all uv pip install commands - Update kfp-kubernetes-native-migration-tests workflow to use our setup-python action and uv commands Signed-off-by: sh4shv4t <shashvat.k.singh.16@gmail.com>
1 parent 225f216 commit cb31976

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

.github/actions/kfp-k8s/action.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ inputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
- name: Setup uv
16-
shell: bash
17-
run: |
18-
curl -LsSf https://astral.sh/uv/install.sh | sh
19-
echo "$HOME/.local/bin" >> $GITHUB_PATH
20-
2115
- name: Build & install kfp-server-api dist
2216
id: install-kfp-server-api
2317
shell: bash
@@ -30,7 +24,7 @@ runs:
3024
echo "Error: No wheel file found"
3125
exit 1
3226
fi
33-
uv pip install --system "$wheel_file"
27+
uv pip install "$wheel_file"
3428
3529
- name: Build kfp dist
3630
id: install-kfp
@@ -44,7 +38,7 @@ runs:
4438
echo "Error: No wheel file found"
4539
exit 1
4640
fi
47-
uv pip install --system "$wheel_file"
41+
uv pip install "$wheel_file"
4842
4943
- name: Generate kfp-kubernetes python proto files from source
5044
id: generate-kfp-kubernetes-proto-files
@@ -68,7 +62,7 @@ runs:
6862
shell: bash
6963
if: ${{ steps.generate-kfp-kubernetes-proto-files.outcome == 'success' }}
7064
run: |
71-
uv pip install --system -e ./kubernetes_platform/python[dev] --find-links=sdk/python/dist
65+
uv pip install -e ./kubernetes_platform/python[dev] --find-links=sdk/python/dist
7266
7367
# testing reinstalling kfp package from source with no deps
7468
- name: Reinstall kfp from source with no deps
@@ -77,4 +71,4 @@ runs:
7771
if: ${{ steps.install-kfp-kubernetes.outcome == 'success' }}
7872
working-directory: ./sdk/python
7973
run: |
80-
uv pip install --system . -I --no-deps
74+
uv pip install . -I --no-deps

.github/actions/protobuf/action.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,10 @@ runs:
3838
rm $PROTOC_ZIP
3939
protoc --version
4040
41-
- name: Setup uv
42-
shell: bash
43-
run: |
44-
curl -LsSf https://astral.sh/uv/install.sh | sh
45-
echo "$HOME/.local/bin" >> $GITHUB_PATH
46-
4741
- name: Install protobuf dependencies with uv
4842
shell: bash
4943
run: |
50-
uv pip install --system setuptools==${{inputs.setuptools_version}} wheel==${{inputs.wheels_version}} protobuf==${{inputs.protobuf_python_version}}
44+
uv pip install setuptools==${{inputs.setuptools_version}} wheel==${{inputs.wheels_version}} protobuf==${{inputs.protobuf_python_version}}
5145
5246
- name: Generate API proto files
5347
working-directory: ./api
@@ -62,7 +56,7 @@ runs:
6256
echo "Error: No wheel files found in api/v2alpha1/python/dist/"
6357
exit 1
6458
fi
65-
uv pip install --system "$wheel_file"
59+
uv pip install "$wheel_file"
6660
6761
- name: Generate kfp-pipeline-spec golang files
6862
if: ${{ inputs.generate_golang_proto == 'true' }}

.github/workflows/kfp-kubernetes-native-migration-tests.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ jobs:
3232
- name: Checkout code
3333
uses: actions/checkout@v5
3434

35-
- name: Set up Python
36-
uses: actions/setup-python@v6
35+
- name: Setup Python with uv
36+
uses: ./.github/actions/setup-python
3737
with:
3838
python-version: "3.9"
39-
cache: 'pip'
4039

4140
- name: Create KFP cluster
4241
id: create-kfp-cluster
@@ -67,12 +66,12 @@ jobs:
6766
- name: Install requirements
6867
id: install-requirements
6968
if: ${{ steps.install-kfp-k8s-deps.outcome == 'success' }}
70-
run: pip install -r ./test/kfp-kubernetes-native-migration-tests/requirements.txt
69+
run: uv pip install -r ./test/kfp-kubernetes-native-migration-tests/requirements.txt
7170

7271
- name: Create test pipelines in DB mode
7372
if: ${{ steps.install-requirements.outcome == 'success' }}
7473
id: create-test-pipelines
75-
run: python ./test/kfp-kubernetes-native-migration-tests/create_test_pipelines.py
74+
run: uv run python ./test/kfp-kubernetes-native-migration-tests/create_test_pipelines.py
7675
continue-on-error: true
7776

7877
- name: Run DB mode migration tests
@@ -82,7 +81,7 @@ jobs:
8281
PULL_NUMBER: ${{ github.event.pull_request.number }}
8382
REPO_NAME: ${{ github.repository }}
8483
KFP_ENDPOINT: "http://localhost:8888"
85-
run: python -m pytest ./test/kfp-kubernetes-native-migration-tests/kfp_db_mode_migration_tests.py -v
84+
run: uv run pytest ./test/kfp-kubernetes-native-migration-tests/kfp_db_mode_migration_tests.py -v
8685
continue-on-error: true
8786

8887
- name: Install cert-manager
@@ -165,7 +164,7 @@ jobs:
165164
PULL_NUMBER: ${{ github.event.pull_request.number }}
166165
REPO_NAME: ${{ github.repository }}
167166
KFP_ENDPOINT: "http://localhost:8888"
168-
run: python -m pytest ./test/kfp-kubernetes-native-migration-tests/kfp_k8s_mode_migration_tests.py -v
167+
run: uv run pytest ./test/kfp-kubernetes-native-migration-tests/kfp_k8s_mode_migration_tests.py -v
169168
continue-on-error: true
170169

171170
- name: Collect failed logs

0 commit comments

Comments
 (0)