fix(ci): upgrade poetry 1.4.2 -> 2.3.2 and relock aw-core#1328
fix(ci): upgrade poetry 1.4.2 -> 2.3.2 and relock aw-core#1328ErikBjare wants to merge 3 commits into
Conversation
The committed poetry.lock files are already in Poetry 2.x format (lock-version 2.0/2.1, generated by Poetry 2.0-2.3), but CI installed poetry==1.4.2, which can't read them. Every job printed: The lock file might not be compatible with the current version of Poetry. Upgrade Poetry to ensure the lock file is read properly or, alternatively, regenerate the lock file with the `poetry lock` command. Pin poetry to 2.3.2 (the toolchain the locks were generated with) so the locks are read correctly. Also bumps the aw-core submodule to pull in its relock (ActivityWatch/aw-core#140); aw-core's lock had genuinely drifted from pyproject.toml ('not consistent with pyproject.toml'), the only lock in the tree that was actually inconsistent rather than just misread.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8082918fd9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| choco install innosetup | ||
| fi | ||
| pip3 install poetry==1.4.2 | ||
| pip3 install poetry==2.3.2 |
There was a problem hiding this comment.
Pin a Poetry release compatible with Python 3.9
In both build matrices this step runs after actions/setup-python selects matrix.python_version, which is currently [3.9], so pip3 is the Python 3.9 pip. Poetry 2.3.2 declares Requires-Python: >=3.10,<4.0, so this install fails before any build/test/package step runs in the Qt and Tauri jobs; install Poetry with a 3.10+ interpreter or pin a Poetry 2.x release that still supports Python 3.9.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — fixed in 2815a4b by pinning poetry==2.2.1 (latest release supporting Python 3.9; 2.3.x requires >=3.10). It still reads the committed lock-version 2.1 files cleanly.
Poetry 2.3.0+ requires Python >=3.10, but the build matrix runs 3.9, so 'pip3 install poetry==2.3.2' fails with 'No matching distribution found'. 2.2.1 is the latest Poetry that supports 3.9 and still reads the committed lock-version 2.1 files (verified: 'poetry check --lock' passes on the relocked aw-core). Caught by Codex review.
The root pyproject is an aggregator (deps only; there is no 'activitywatch' package directory). Poetry 2.x defaults to package mode and 'poetry install' fails with 'No file/folder found for package activitywatch'. Poetry 1.4.2 silently tolerated this. Set package-mode = false so poetry only manages dependencies. Verified with poetry 2.2.1: 'poetry install' no longer tries to build the root project.
Problem
All the committed
poetry.lockfiles are already in Poetry 2.x format (lock-version 2.0/2.1, generated by Poetry 2.0–2.3), but CI installspoetry==1.4.2, which can't read them. Every job logs, repeatedly:A separate, real warning appeared only for aw-core:
I checked every submodule lock with Poetry 2.3.2 (
poetry check --lock) — aw-core was the only one genuinely inconsistent; the rest were just being misread by the ancient CI poetry.Fix
poetry==2.3.2(lines 339 & 535) — the toolchain the locks were generated with — so they're read correctly. The locks being newer than CI's poetry means 2.x is the correct tool here, not a risky upgrade.Validation
This triggers the full build matrix (Qt + Tauri × macOS/Linux/Windows). Watching it to confirm
poetry install/make buildbehave under poetry 2.x before merge.Part of the CI-reliability cleanup alongside #1326 (aw-watcher-window flake) and #1327 (MACOSX_DEPLOYMENT_TARGET).