-
-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very weird flaky test_create_table_ignore_replace and test_upsert tests #2356
Comments
This is SO weird:
Why would it EVER generate that SQL query? Especially only intermittently? |
One of those failures was |
It would be fantastic if we could figure out a way to reliably replicate this failure in dev, so we can |
Uh oh... hit a different flaky write test, presumably for the same underlying reason? Also SQLite 3.25.3
https://github.com/simonw/datasette/actions/runs/9503858661/job/26195236184
|
That change did indeed help further understand. the problem: https://github.com/simonw/datasette/actions/runs/9503993969/job/26195656683
So it looks like the |
I'm very suspicious that there might be some intermittent SQLite bug present in 3.25.3 involving |
The SQLite changelog, tags stripped, is about 77,000 tokens:
So I ran it through Claude Haiku: curl 'https://sqlite.org/changes.html' | strip-tags | llm -m haiku \
--system 'identify any fixed bugs that could impact how rowid column selects work, and quote those lines along with the SQLite version number'
Those are all earlier than 3.25 so it's not them. |
Follow-up:
But no, neither of these look likely. I may have to read the release notes myself!
|
Couldn't find anything searching https://sqlite.org/changes.html for |
3.25.3 amalgamation: https://www.sqlite.org/2018/sqlite-amalgamation-3250300.zip (I had to use Internet Archive to find it, couldn't quite guess the URL: https://web.archive.org/web/20181120115249/https://www.sqlite.org/download.html) |
I figured out how to run that version of SQLite on macOS here: |
Means I can run the tests like this: DYLD_LIBRARY_PATH=/tmp/sqlite-amalgamation-3250300 pytest -n auto |
Both failing tests are in DYLD_LIBRARY_PATH=/tmp/sqlite-amalgamation-3250300 \
pytest tests/test_api_write.py -n auto Weirdly without Maybe I need to try getting the tests to fail under Ubuntu in a Docker container instead. |
I'm going to leave this for the moment. |
I figured out how to run the test suite in a Ubuntu Docker container with that old version of SQLite here - but the tests pass for me: |
Using that trickery I still can't replicate the failing tests using Ubuntu and Python 3.12.3 and SQLite: 3.25.3 - which is the same combo as the failed run in https://github.com/simonw/datasette/actions/runs/9503993969/job/26195656683
See #2349 (comment) for how I ran that. |
Might be easier to replicate this using GitHub codespaces. Those might be closer to the GitHub Actions environment |
Another option would be a way to have that specific test dumped out a SQLite database file if it fails which then gets uploaded to the run as a as artifact. |
I think these are failures just against SQLite: 3.25.3 (the earliest we suport, refs #2349) - update this note if we see them on alternative versions.
https://github.com/asg017/datasette/actions/runs/9503518697/job/26194122396
The text was updated successfully, but these errors were encountered: