Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/address-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
submodules: true
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Install uv with mise
uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mise-action is used without version: in all five workflows, so the mise binary floats. On a cache miss each job looks up the version in mise.jdx.dev/releases.tsv, and cached mise versions can differ by platform for up to 30 days.

An outage at mise.jdx.dev, or a mise release that changes lockfile or --locked handling, breaks every CI job with no repo change. The lock already mixes two formats (lychee entries have no url_api/provenance, uv entries do), which shows the format depends on the mise version. Pinning version: (optionally with sha256:) makes this reproducible and removes the extra service.

🤖 Comment by Claude Opus 5.5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems fine

with:
install_args: uv

- name: Install packages
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/clang-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ jobs:
- name: Install clang-tools
run: sudo apt install clang-tools

- name: Install the latest version of uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Install uv with mise
uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3
with:
install_args: uv

- name: Build and run analyzer
# We exclude extension/libmaxminddb/ as libmaxminddb has its own workflow
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ jobs:
with:
languages: python, cpp

- name: Install the latest version of uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Install uv with mise
uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3
with:
install_args: uv

- run: uv build
env:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test-libmaxminddb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ jobs:
submodules: true
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2

- name: Install tox
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv --with tox-gh
- name: Install uv with mise
uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3
with:
install_args: uv

- name: Install Python
if: matrix.env != '3.14'
Expand All @@ -61,6 +60,6 @@ jobs:
CFLAGS: "${{ env.CFLAGS }} -Werror -Wall -Wextra"

- name: Run test suite
run: tox run --skip-missing-interpreters false
run: uvx --python-preference only-managed --python 3.14 --with tox-uv-bare --with tox-gh tox run --skip-missing-interpreters false
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
with:
submodules: true
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv --with tox-gh
- name: Install uv with mise
uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Switching from setup-uv drops the uv package cache. setup-uv's enable-cache: auto saved and restored UV_CACHE_DIR on GitHub-hosted runners, and tox-uv's uv also used that cache.

Each of the 28 test.yml jobs, 15 test-libmaxminddb jobs and 3 single jobs now downloads every wheel/sdist and Python build again. Each push to a PR branch runs them twice (push and pull_request triggers). That makes CI slower and more exposed to PyPI/GitHub download failures. Cheaper options: keep setup-uv, or add actions/cache on uv cache dir keyed on uv.lock.

🤖 Comment by Claude Opus 5.5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems fine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing setup-uv also removes its Python problem matcher. setup-uv v10.3.2 has add-problem-matchers: true by default and registers a python.json matcher, which turns Python tracebacks into GitHub annotations. mise-action does not register a matcher.

A pytest failure or traceback in the test jobs no longer shows as an annotation on the PR's changed lines or in the run summary. Reviewers must open the raw log to find the file and line that failed.

🤖 Comment by Claude Opus 5.5.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

From Claude (Claude Opus 5.5), on Greg's behalf: Not adding a problem matcher. setup-uv's python.json matcher matches only a File "...", line N line directly followed by a raise Foo('...') line. pytest's default failure output does not have that shape, so the matcher rarely made annotations for these test jobs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing setup-uv also drops its Windows directory defaults. On Windows, setup-uv v10.3.2 sets UV_TOOL_DIR, UV_TOOL_BIN_DIR and UV_PYTHON_INSTALL_DIR (and UV_CACHE_DIR when it caches) to directories under RUNNER_TEMP, which is on the D: drive.

Now the windows-latest jobs write the uv cache, tool environments and Python installs under the user profile on the C: drive, which is usually slower on GitHub-hosted Windows runners. The UV_TOOL_BIN_DIR default is also why setup-uv put tox on PATH on Windows and mise-action does not.

🤖 Comment by Claude Opus 5.5.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

From Claude (Claude Opus 5.5), on Greg's behalf: Not setting these directories. The Windows jobs on this PR are not slower than on main: on average, 156s on main and 75s on this PR. The tox PATH problem is fixed separately, because the test step now runs tox with uvx (df180bc).

with:
install_args: uv

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment is about .github/workflows/links.yml line 31, which is outside the diff. The repo now has two ways to install one mise tool: links.yml uses install: false plus a mise install lychee run step, and the new steps use install_args: uv.

links.yml's manual install gets no automatic --locked checksum enforcement and never saves the mise cache (the log shows 'mise cache not found' and a fresh install on each run). Using install_args: lychee there would make the workflows consistent and give it both.

🤖 Comment by Claude Opus 5.5.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

From Claude (Claude Opus 5.5), on Greg's behalf: Not changing links.yml in this PR. That workflow follows a template that many of our repositories share, so a change to it belongs in all of them, not in this uv change.

- name: Install Python
if: matrix.env != '3.14'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Run test suite
run: tox run --skip-missing-interpreters false
run: uvx --python-preference only-managed --python 3.14 --with tox-uv-bare --with tox-gh tox run --skip-missing-interpreters false
env:
MAXMINDDB_REQUIRE_EXTENSION: 1
MM_FORCE_EXT_TESTS: 1
Expand Down
40 changes: 40 additions & 0 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lockfile = true

[tools]
lychee = "latest"
uv = "latest"

[tasks.check-links]
description = "Check links with lychee"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Documentation = "https://maxminddb.readthedocs.io/en/latest/"
[dependency-groups]
dev = [
"pytest>=8.3.5",
"tox-uv>=1.29.0",
"tox-uv-bare>=1.32.0",
]
lint = [
"mypy>=1.15.0",
Expand Down
42 changes: 2 additions & 40 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading