Skip to content

Commit 0f4f663

Browse files
authored
[v3-0-test] Standardize uv and prek installation (#54864) (#54870)
There were a little inconsistencies how uv and prek were installed in our CI * install-prek action was not used in ci-amd.yaml * UV_VERSION was not fixed in release-dockerhub-images * uv was installed with pip rather than installation script from astral in install-prek action (cherry picked from commit f229fea)
1 parent 48084ea commit 0f4f663

5 files changed

Lines changed: 596 additions & 33 deletions

File tree

.github/actions/install-prek/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ inputs:
3737
runs:
3838
using: "composite"
3939
steps:
40-
- name: Install prek and uv
40+
- name: Install uv and prek
4141
shell: bash
4242
env:
4343
UV_VERSION: ${{inputs.uv-version}}
4444
PREK_VERSION: ${{inputs.prek-version}}
4545
SKIP: ${{ inputs.skip-prek-hooks }}
4646
run: |
47-
pip install uv==${UV_VERSION} || true
47+
curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh
4848
uv tool install prek==${PREK_VERSION} --with uv==${UV_VERSION}
4949
working-directory: ${{ github.workspace }}
5050
# We need to use tar file with archive to restore all the permissions and symlinks

.github/workflows/ci-amd.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,13 @@ jobs:
176176
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
177177
with:
178178
persist-credentials: false
179-
- name: "Install Python 3.11 as 3.11+ is needed by pin-versions"
180-
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
179+
- name: "Install prek"
180+
uses: ./.github/actions/install-prek
181+
id: prek
181182
with:
182-
python-version: 3.11
183-
cache: "pip"
184-
- name: Install prek, uv
185-
shell: bash
186-
env:
187-
UV_VERSION: "0.8.13" # Keep this comment to allow automatic replacement of uv version
188-
PREK_VERSION: "0.1.2" # Keep this comment to allow automatic replacement of prek version
189-
run: |
190-
pip install uv==${UV_VERSION} || true
191-
uv tool install prek==${PREK_VERSION} --with uv==${UV_VERSION}
183+
# octopin needs python 3.11
184+
python-version: "3.11"
185+
platform: "linux/amd64"
192186
- name: "Run pin-versions"
193187
run: >
194188
prek -c .github/.pre-commit-config.yaml --all-files --verbose --hook-stage manual
@@ -921,12 +915,12 @@ jobs:
921915
# yamllint disable rule:line-length
922916
payload: |
923917
channel: "internal-airflow-ci-cd"
924-
text: "🚨🕒 Scheduled CI Failure Alert (AMD) on branch *${{ github.ref_name }}* 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
918+
text: "🚨🕒 Failure Alert: Scheduled CI (AMD) on branch *${{ github.ref_name }}* 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
925919
blocks:
926920
- type: "section"
927921
text:
928922
type: "mrkdwn"
929-
text: "🚨🕒 Scheduled CI Failure Alert (AMD) 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
923+
text: "🚨🕒 Failure Alert: Scheduled CI (AMD) 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
930924
# yamllint enable rule:line-length
931925

932926
summarize-warnings:

.github/workflows/release_dockerhub_image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
AIRFLOW_VERSION: ${{ github.event.inputs.airflowVersion }}
5959
AMD_ONLY: ${{ github.event.inputs.amdOnly }}
6060
LIMIT_PYTHON_VERSIONS: ${{ github.event.inputs.limitPythonVersions }}
61+
UV_VERSION: "0.8.13" # Keep this comment to allow automatic replacement of uv version
6162
if: contains(fromJSON('[
6263
"ashb",
6364
"eladkal",
@@ -89,7 +90,7 @@ jobs:
8990
- name: "Prepare and cleanup runner"
9091
run: ./scripts/ci/prepare_and_cleanup_runner.sh
9192
- name: "Install uv"
92-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
93+
run: curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh
9394
- name: "Check airflow version"
9495
id: check-airflow-version
9596
shell: bash

0 commit comments

Comments
 (0)