Repository navigation
Inject the schema fault where get_progress gets its connection - #11610
Merged
Merged
Conversation
Since #11525 a warm thread reuses its pooled connection without calling get_connection. _seed() pools one, so the fault the no-such-column test wrapped around get_connection was never reached when the test ran on its own, and it passed only when an earlier test left the pool unusable.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…thai#11610) * Inject the schema fault where get_progress gets its connection Since unslothai#11525 a warm thread reuses its pooled connection without calling get_connection. _seed() pools one, so the fault the no-such-column test wrapped around get_connection was never reached when the test ran on its own, and it passed only when an earlier test left the pool unusable. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.
test_a_real_no_such_column_error_is_not_swallowedfails whenever it does not run straight after the tests above it instudio/backend/tests/test_chat_generation_lease_compat.py. It failed in the Python 3.13 a-k shard under xdist:On main,
pytest -k no_such_columnfails 1/1 every time. The full file passes only because of the order its tests run in.Cause
The test wraps
runs_db.get_connectionin a fake connection that raisesno such column: some_other_column, then expectsget_progressto let that error through. #11525 made_connect()reuse the thread's pooled connection without callingget_connectionat all, and thecreate_runinside_seed()has just pooled one. Soget_progressnever reached the fake, and nothing raised.d4a402b57~1(before #11525)d4a402b57(#11525) and mainThe product is right.
get_progressstill re-raises anyno such columnthat does not name a lease column. The test's fault injection went stale.Change
The fault is now injected at
runs_db._connect, the handleget_progressactually uses, so the test works whether or not a pooled connection exists. The other two injections in this file (_Racy,_Locked) are unaffected. Both rebindruns_db._schema_readyfirst, which invalidates the pooled entry and sends the call back throughget_connection.Verification
-n 4.get_progressswallow everyOperationalErrorfails the test, both alone and in the full file (DID NOT RAISE OperationalError).