Cap sqlalchemy below 2.1 and watch what consumers resolve - #64
Merged
Merged
Conversation
`persistence` declared `sqlalchemy[asyncio]>=2.0.52` with no ceiling, and this library's CI installs its own lockfile pin of 2.0.52. So a range that admits an untested version always resolved to the tested one, and nothing here could see what a consumer gets. What a consumer got was 2.1.1, which opentelemetry-instrumentation-sqlalchemy declares it does not support (`sqlalchemy >= 1.0.0, < 2.1.0` -- still true of 0.66b0, the newest release, checked today). On 2.1 it logs one error at startup and then emits no database spans at all. 2.1 was never working; it was failing quietly, which is the worse of the two. Measured both ways before committing to the ceiling: a fresh resolve gives 2.0.54 with it and 2.1.1 without. The ceiling alone would sit here and be forgotten, so the second half is a `fresh-resolve` workflow that resolves the loosest versions the constraints allow and runs typecheck plus the offline suite against them. Weekly and on demand, not per pull request -- for the reason the `audit` job is already separate: a new upstream minor is news about the world, not a defect in somebody's branch, and it should not turn their build red. It writes the version diff to the step summary so a red run explains itself, and it deliberately skips the integration suite: standing up five service containers weekly to re-prove those paths costs more than it tells us, and the instrumentation failure that prompted all this is handled by the ceiling directly rather than by testing for it. BREAKING: a service already resolving 2.1.x cannot install this version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Candidate addition #3.
persistencedeclaredsqlalchemy[asyncio]>=2.0.52with no ceiling, and this library's CI installs its own lockfile pin of2.0.52. So a range that admits an untested version always resolved to the tested one, and nothing on this side could see what a consumer gets.What a consumer got was 2.1.1, which
opentelemetry-instrumentation-sqlalchemydeclares it does not support:— still true of 0.66b0, the newest release, checked today. Against 2.1 it logs one error at startup and then emits no database spans at all. So 2.1 was never working; it was failing quietly, which is the worse of the two. Being unable to install is the louder failure.
Measured both ways before committing to it
pyproject.tomluv lock --upgraderesolves>=2.0.52,<2.1>=2.0.52The lockfile's own pin is untouched at 2.0.52 — the only change there is the recorded constraint.
The second half, because a ceiling alone gets forgotten
.github/workflows/fresh-resolve.ymlresolves the loosest versions the constraints allow (uv lock --upgrade) and runs typecheck plus the offline suite against them.Weekly and on demand, not per pull request — for the reason the
auditjob is already separate, andci.ymlsays it out loud: a vulnerability advisory is news about the world, not a defect in the pull request. A new upstream minor is the same kind of news and should not turn somebody's branch red.It writes the version diff to the step summary, so a red run explains itself and a green one lists what the lockfile could safely move to.
It deliberately skips the integration suite. Standing up five service containers weekly to re-prove those paths costs more than it tells us — and the instrumentation-compatibility failure that prompted all this is handled by the ceiling directly rather than by testing for it. That limit is written in the workflow rather than left for someone to discover.
Verification
make checkgreen (403 passed, 92.23%),make extras-checkgreen on all twelve pairs, 64 integration tests pass against a rebuilt stack.Follow-up
Raise the ceiling when the instrumentor supports 2.1 —
fresh-resolveis what will report that. Recorded inCLAUDE.mdunder settled decisions so the cap is not "fixed" by widening it.Next
Five candidates left: #6 (adopt uvicorn's loggers — not
uvicorn.access, which would duplicate the access logRequestContextMiddlewarealready emits), then #2, #4, #1, #7, then release 0.3.0.