-
Notifications
You must be signed in to change notification settings - Fork 0
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
Handle property migration write conflicts #412 #433
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #433 +/- ##
===========================================
+ Coverage 97.89% 97.91% +0.01%
===========================================
Files 48 48
Lines 1712 1723 +11
===========================================
+ Hits 1676 1687 +11
Misses 36 36 ☔ View full report in Codecov by Sentry. |
cfc0b6e
to
9922030
Compare
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.
Looks good, just have a few minor docstring comments to make. I also had a general question about the issue itself.
The issue is meant to handle when a property migration fails
; is this an issue related to our migration scripts, or generally when users add/edit properties? Also, why has it only been an issue for catalogue category properties, and not other entities?
This is specifically for adding or editing properties at the catalogue category level. We tend to keep calling them migrations as that's how we thought of them when we added them, but they are different to the migrations scripts. The property migration here refers to the propagation of new properties/changes to their name down through their catalogue items and items, whereas the migration scripts are a one time change we make to how the database stores the data itself. |
c2ed5fa
to
2274dcb
Compare
Description
See #412. Adds a new
WriteConflictError
, added function to handle these for transactions and used this in the property migrations.To test the function you can use the following scripts updated from those in the issue:
test1.py
test2.py
It is not easily possible to test it inside the actual api itself which is why there isn't any e2e tests. The final error message gets displayed in the front end currently as
going to
while updating property
when updating.Testing instructions
Add a set up instructions describing how the reviewer should test the code
Agile board tracking
Closes #412