Skip to content

fix(ci): run on Python 3.13.18 and avoid an order-dependent pylint E1136 (#492) - #493

Merged
ArthurCRodrigues merged 3 commits into
mainfrom
fix/ci-python-3.13.18
Nov 21, 2026
Merged

ArthurCRodrigues merged 3 commits into
mainfrom
fix/ci-python-3.13.18

Conversation

@jaoppb

@jaoppb jaoppb commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Closes #492

Every CI job fails at actions/setup-python. ubuntu-latest is now Ubuntu 26.04, and no Python 3.13.11 build exists for it (example run). This unblocks #490 and the other PRs waiting on CI.

Changes

  • .tool-versions: python 3.13.18, which actions/python-versions publishes for Ubuntu 22.04, 24.04 and 26.04. All 10 setup-python steps (verify, release, docs-pages) read this file. No other file pins the patch version: the Dockerfiles use the digest-pinned python:3.13-slim-trixie, pyproject.toml requires ==3.13.*, and the docs say 3.13.
  • web/database/models/*.py (the 5 modules using Mapped[...]): from __future__ import annotations. This fixes a separate make lint failure, E1136 unsubscriptable-object on Mapped[...]. It does not come from the Python bump: it reproduces on 3.13.11 with the locked pylint 4.1.3 / astroid 4.3.4 whenever pylint visits grading_attempt.py before grading_config.py. That order follows the filesystem's directory listing, so CI could pass or fail by chance. The cause is that astroid caches Uninferable once an inference context exhausts its max_inferred budget, so Mapped loses its ancestors for later files (Inference cache stores results truncated by the inference budget, making inference order-dependent pylint-dev/astroid#3383; the fix, Fix order-dependent inference caused by caching budget-truncated results pylint-dev/astroid#3384, is unreleased and 4.3.4 is the latest). Pylint does not check postponed annotations for subscriptability. Remove the import once astroid ships the fix.

Verification

  • make lint has no E/F messages in either file order and is rated 9.56/10, the same as the last green run on main.
  • make test-web (SQLite HTTP tests, including the alembic upgrade check that migrations match the models) passes: 496 passed.
  • Unit tests: 1665 passed. 2 failures are unrelated to the diff and come from the local machine: test_missing_credentials_are_not_retryable read a local ~/.aws config and passes with it hidden, and test_trickled_error_body_is_bounded is a timing flake that passed 3/3 when rerun.
  • Mapper equivalence: DDL (PostgreSQL and SQLite), column, index and relationship dumps after configure_mappers() match main exactly.
  • make test-postgres was not run locally (it needs Docker). It covers the same mappers via schema_differences == [].

🤖 Generated with Claude Code

…136 (#492)

ubuntu-latest is now Ubuntu 26.04, which has no Python 3.13.11 build, so
every job failed at setup-python. Pin 3.13.18, the latest 3.13 patch
published for it.

The SQLAlchemy models also failed lint with E1136 on Mapped[...] when
pylint visited grading_attempt.py before grading_config.py: astroid
caches Uninferable once an inference context exhausts its budget, so
Mapped loses its ancestors for later files (pylint-dev/astroid#3383).
The order comes from the filesystem, so CI was flaky. Postponed
annotations in the model modules keep pylint from checking those
subscripts; remove them once astroid ships the fix.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 19:40

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

#492)

Ubuntu 26.04 runners ship Docker 29, whose containerd snapshotter keeps
Docker's own mountpoints (/app, /sbin/docker-init) in the container's
writable layer; overlay2 kept them in its init layer. On ext4 each
directory is a 4 KiB block, so a fresh read-only sandbox reports SizeRw
8192 before the submission runs, under runc and runsc alike.

The storage tests now check that the writable layer holds only those
mountpoints and that the probe leaves SizeRw unchanged, which still
catches any byte a submission writes to host disk on either driver.
@ArthurCRodrigues
ArthurCRodrigues merged commit 13e2a88 into main Nov 21, 2026
8 checks passed
@ArthurCRodrigues
ArthurCRodrigues deleted the fix/ci-python-3.13.18 branch November 21, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: setup-python fails on Ubuntu 26.04 (Python 3.13.11 unavailable); bump to 3.13.18

3 participants