Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump astral-sh/setup-uv from 4 to 5 in the github-actions group #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 23, 2024

Bumps the github-actions group with 1 update: astral-sh/setup-uv.

Updates astral-sh/setup-uv from 4 to 5

Release notes

Sourced from astral-sh/setup-uv's releases.

v5.0.0 🎄 Merry Christmas - Help fastly and users by default

Changes

This christmans 🎄 release is a bit early bit still full of presents 🎁 Since we are changing some of the defaults this can lead to breaking changes, thus the major version increase.

Here are the highlights:

Default to enable-cache: true on GitHub hosted runners

Did you know that that Fastly, the company hosting PyPI, theoretically has to pay $12.5 million per month and so far have served more than 2.41 exabytes of data? image

This is why they asked us to turn on caching by default. After weighting the pros and cons we decided to automatically upload the cache to the GitHub Actions cache when running on GitHub hosted runners. You can still disable that with enable-cache: false.

I remember when I first got into actions and didn't understand all the magic. I was baffled that some actions did something behind the scenes to make everything faster. I hope with this change we help a lot of users who are don't want to or are afraid to understand what enable-cache does.

Add **/requirements*.txt to default cache-dependency-glob

If caching is enabled we automatically searched for a uv.lock file and when this changed we knew we had to refresh the cache. A lot of projects don't use this but rather the good old requirements.txt. We now automatically search for both uv.lockand requirements*.txt (this means also requirements-test.txt, requirements-dev.txt, ...) files. You can change this with cache-dependency-glob

Auto activate venv when python-version is set

Some workflows install packages on the fly. This automatically works when using a python version that is already present on the runner. But if uv installs the version, e.g. because it is a free-threaded version or an old one, it is a standalone-build and installing packages "into the system" is not possible.

We now automatically create a new virtual environment with uv venv and activate it for the rest of the workflow if python-version is used. This means you can now do

- name: Install uv
  uses: astral-sh/setup-uv@auto-environment
  with:
    python-version: 3.13t
- run: uv pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython

🚨 Breaking changes

🐛 Bug fixes

🚀 Enhancements

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Summary by Sourcery

Build:

  • Update the setup-uv action to v5.

Bumps the github-actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).


Updates `astral-sh/setup-uv` from 4 to 5
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v4...v5)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 23, 2024
Copy link

sourcery-ai bot commented Dec 23, 2024

Reviewer's Guide by Sourcery

This PR updates the astral-sh/setup-uv GitHub Action from v4 to v5. This change introduces automatic caching on GitHub hosted runners, adds requirements*.txt to the default cache dependency glob, auto-activates a virtual environment when python-version is set, and includes several bug fixes and enhancements.

Sequence diagram for updated setup-uv v5 workflow with automatic caching

sequenceDiagram
    participant GH as GitHub Action
    participant UV as setup-uv@v5
    participant Cache as GitHub Cache
    participant PyPI as PyPI (Fastly)

    GH->>UV: Run setup-uv action
    Note over UV: Check if on GitHub hosted runner
    UV->>Cache: Check for cached dependencies
    alt Cache hit
        Cache-->>UV: Return cached packages
    else Cache miss
        UV->>PyPI: Download packages
        UV->>Cache: Store packages in cache
    end
    Note over UV: Auto-create and activate venv
    UV-->>GH: Setup complete
Loading

State diagram for setup-uv v5 caching behavior

stateDiagram-v2
    [*] --> CheckRunner
    CheckRunner --> CacheEnabled: GitHub hosted runner
    CheckRunner --> CacheDisabled: Self-hosted runner

    CacheEnabled --> CheckDependencies
    CheckDependencies --> ScanFiles: Check dependency files
    ScanFiles --> CacheCheck: Search uv.lock and requirements*.txt

    CacheCheck --> UseCachedDeps: Cache hit
    CacheCheck --> DownloadDeps: Cache miss
    DownloadDeps --> UpdateCache: After download

    UseCachedDeps --> SetupComplete
    UpdateCache --> SetupComplete
    CacheDisabled --> SetupComplete

    SetupComplete --> [*]
Loading

File-Level Changes

Change Details Files
Update astral-sh/setup-uv action
  • Updated the uses directive for astral-sh/setup-uv from v4 to v5.
action.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants