-
Notifications
You must be signed in to change notification settings - Fork 75
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
Entity submission create-as-update by logging forceProcessed in source #1251
Conversation
24619df
to
087e350
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.
Just a few small questions/comments. It's looking good!
087e350
to
53a9f4e
Compare
@@ -0,0 +1,20 @@ | |||
// Copyright 2024 ODK Central Developers |
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.
Note to self: change this migration date if merging after https://github.com/getodk/central-backend/pull/1253/files (20241029-01-schedule-entity-form-upgrade-create-forms.js
)
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.
(done)
53a9f4e
to
7020876
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 great! Always exciting to close two issues with one PR. 🚀
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.
Sorry, that was meant to be an approval. 😅
Closes getodk/central#702, also closes getodk/central#720
simplified version of PR #1232
Adds
forceProcessed
flag toentity_def_sources
table and fills it in.Uses that to check if, when failing to create an entity because of a uuid conflict, whether the root version of the entity was force-applied. If so, that suggests it's appropriate to try applying the create action as an update instead.
What has been done to verify that this works as intended?
Why is this the best possible solution? Were any other approaches considered?
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.
Before submitting this PR, please make sure you have:
make test
and confirmed all checks still pass OR confirm CircleCI build passes