Skip to content

fix: pin uv version and add caching to CI workflows#127

Merged
jmeridth merged 1 commit intomainfrom
fix/uv-version-pin-and-caching
Mar 12, 2026
Merged

fix: pin uv version and add caching to CI workflows#127
jmeridth merged 1 commit intomainfrom
fix/uv-version-pin-and-caching

Conversation

@jmeridth
Copy link
Collaborator

@jmeridth jmeridth commented Mar 11, 2026

Summary

  • Pin uv to version 0.10.9 with caching enabled across all setup-uv action usages
  • Add concurrency groups to CI and linter workflows to cancel in-progress runs on new pushes
  • Mirrors changes from fix: uv version pin and caching evergreen#496

Test plan

  • Verify CI workflows run successfully with pinned uv version
  • Verify caching works on subsequent runs
  • Verify concurrency cancellation works when pushing multiple times to same branch

## What

Pin uv to version 0.10.9 with caching enabled across all setup-uv action
usages in CI workflows. Add concurrency groups to CI and linter workflows
to cancel in-progress runs on new pushes.

## Why

Unpinned uv versions can cause unexpected CI breakage when new releases
introduce breaking changes. Caching speeds up workflow runs. Concurrency
cancellation avoids wasting CI resources on outdated pushes.

## Notes

- Mirrors changes from github-community-projects/evergreen#496
- The concurrency block only applies to CI and linter workflows, not to
  copilot-setup-steps or update-uv-lock workflows

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth requested a review from zkoppert as a code owner March 11, 2026 06:11
Copilot AI review requested due to automatic review settings March 11, 2026 06:11
@github-actions github-actions bot added the fix label Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CI workflows to use a pinned uv version and adds workflow-level concurrency controls, aligning with the referenced evergreen change.

Changes:

  • Pin uv to 0.10.9 and enable setup-uv caching in all workflows that install uv.
  • Add concurrency groups to cancel in-progress runs on new pushes for the Python package and linter workflows.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/update-uv-lock.yml Pins uv and enables setup-uv caching for lockfile update automation.
.github/workflows/python-package.yml Adds concurrency cancellation and pins/enables cached uv in the main test workflow.
.github/workflows/linter.yaml Adds concurrency cancellation and pins/enables cached uv in the lint workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +34
with:
version: "0.10.9"
enable-cache: true
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

enable-cache: true will attempt to use the GitHub Actions cache, but this workflow explicitly sets permissions and does not grant any actions permission. With restricted GITHUB_TOKEN permissions, cache restore/save can fail (often with "Resource not accessible by integration"). Consider adding actions: write (or at least actions: read if you only want restores) to the workflow/job permissions when enabling uv caching.

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 35
with:
version: "0.10.9"
enable-cache: true
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

This workflow enables setup-uv caching (enable-cache: true) but the workflow-level permissions only grants contents: read, leaving actions as none. GitHub’s cache API requires actions: write to save caches (and actions: read to restore), so the caching step may fail under the restricted token. Add the appropriate actions permission if caching is intended.

Copilot uses AI. Check for mistakes.
Comment on lines 32 to 35
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
with:
version: "0.10.9"
enable-cache: true
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

enable-cache: true relies on the Actions cache service, but the workflow/job permissions don’t grant any actions scope (only contents, packages, statuses). With permissions set explicitly, actions defaults to none, which can prevent cache restore/save. Add actions: write (or actions: read if you only want restores) when enabling uv caching.

Copilot uses AI. Check for mistakes.
@jmeridth jmeridth merged commit dd1411a into main Mar 12, 2026
47 checks passed
@jmeridth jmeridth deleted the fix/uv-version-pin-and-caching branch March 12, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants