-
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
Missing conflict handling when editing / adding / removing contributors #1568
Comments
What I noticed in the logs is that NOT conflict resolution is hit, but far before that, the code that checks if the length of the supplied position equals the length of the current contributors:
That is also a kind of conflict resolution, not? Any way that fails silently indeed. Possible solution could be to compare the supplied _version against the stored publication/dataset. Or remove the check on length altogether, and let the version-conflict handle the rest? |
Changing the order should create a new snapshot each time. So, this should be treated as a version conflict. I don't think the extra check on length adds value here. Make sure cypress tests are adjusted accordingly to catch the above case as well. |
The extra check for length did have it's purpose, since index-based copying over to a new slice without precaution would result in index-out-of-array-bounds errors. I improved the copying to make it safe and removed the check. Now it does display the concurrency error (+ small extra HTMX swapping fix for dataset creators). |
Found another somewhat related bug, described in #1701. |
* Fixed reorder contributors concurrency bug #1568 * Added concurrency tests for all contributor types when reordered in another session * Cypress: hooked up drag command the same way as other commands * Improved test structure #1568 * Fixed test comments * Using cy.verifyConflictErrorDialog() command
Bug description
When I add, remove or order a contributor from a publication or dataset which was being edited by someone else; I don't see a warning that a conflict error has happened. However, when I reload the page, I notice that my change weren't saved: I see the changes made by the other person who was editing instead.
Steps to Reproduce
Automatic testing scenario
Write a high-level way to test this with Cypress if applicable.
Risk classification
Likelihood
Probable
Consequences
Critical. If multiple people add, remove & reorder contributors at the same time, they'll see contributors inexplicably appear and disappear because there's no indication someone else is working on the same record at the same time.
Expected behavior
All mutative actions should give you a conflict error dialog whenever someone else made a change.
The text was updated successfully, but these errors were encountered: