-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: catch some potential errors on dual write #20351
Conversation
items = set(session) | ||
except ObjectDeletedError: | ||
logger.warning("ObjectDeletedError", exc_info=True) | ||
return iter(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was erroring for me when running integration tests, so I just thought it would be safe to catch and log the error in case it happens in the real world.
Codecov Report
@@ Coverage Diff @@
## master #20351 +/- ##
==========================================
+ Coverage 66.49% 66.51% +0.02%
==========================================
Files 1734 1738 +4
Lines 64996 65097 +101
Branches 6871 6885 +14
==========================================
+ Hits 43219 43302 +83
- Misses 20020 20047 +27
+ Partials 1757 1748 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
be542dd
to
baa5cd8
Compare
437416a
to
4efb13a
Compare
🏷️ preset:2022.23 |
* catch some potential errors on dual write * fix test for sqlite (cherry picked from commit 5a13782)
* catch some potential errors on dual write * fix test for sqlite (cherry picked from commit 5a13782)
we're seeing some errors when trying to import a dashboard:
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "sl_columns_uuid_key"
The issue is intermittent, and I was only able to replicate in a test by making the lookup for aNewColumn
return none. I added in a catch for that scenario and also changed the sessionadd
tomerge
to take a safer route in case SqlAlchemy is trying to add rather than update in some cases.TESTING INSTRUCTIONS
difficult to reproduce, but regression testing should apply: you should be able to update datasets, columns, etc with no errors.
ADDITIONAL INFORMATION