From eed3966b8170c74955791520ea8296e1f54d5d6e Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 17 Aug 2025 12:42:31 +0200 Subject: [PATCH] Fix prek teething errors for canary builds After switching to prek in #54258 there are still few small things thet were only discovered in our canary builds: * installation of prek hooks does not necessarily create uv cache * autoupgrade is not yet implemented in prek --- .github/workflows/basic-tests.yml | 14 ++++++++------ .github/workflows/ci-image-checks.yml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 32b7321cc601b..65215396c05f1 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -257,12 +257,14 @@ jobs: with: python-version: ${{steps.breeze.outputs.host-python-version}} skip-prek-hooks: ${{ inputs.skip-prek-hooks }} - - name: "Autoupdate all prek hooks" - run: prek autoupdate --freeze - - name: "Autoupdate Lucas-C hooks to bleeding edge" - run: prek autoupdate --bleeding-edge --freeze --repo https://github.com/Lucas-C/pre-commit-hooks - - name: "Check if there are any changes in pre-commit hooks" - run: git diff --exit-code + # TODO(potiuk): enable this once prek supports automatic upgrade of hooks + # after https://github.com/j178/prek/issues/35 is implemented§ + # - name: "Autoupdate all prek hooks" + # run: prek autoupdate --freeze + # - name: "Autoupdate Lucas-C hooks to bleeding edge" + # run: prek autoupdate --bleeding-edge --freeze --repo https://github.com/Lucas-C/pre-commit-hooks + # - name: "Check if there are any changes in pre-commit hooks" + # run: git diff --exit-code - name: "Run automated upgrade for black" run: > prek diff --git a/.github/workflows/ci-image-checks.yml b/.github/workflows/ci-image-checks.yml index 2d52aec1ad04f..cd0c627ae11e9 100644 --- a/.github/workflows/ci-image-checks.yml +++ b/.github/workflows/ci-image-checks.yml @@ -151,7 +151,7 @@ jobs: if: inputs.canary-run == 'true' - name: "Prepare .tar file from prek cache" run: | - tar -C ~ -czf /tmp/cache-prek.tar.gz .cache/prek .cache/uv + tar -C ~ -czf /tmp/cache-prek.tar.gz .cache/prek shell: bash if: inputs.canary-run == 'true' - name: "Save prek cache"