Overhaul of merge conflict tests#414
Draft
lukaskubanek wants to merge 20 commits intopointfreeco:mainfrom
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This PR depends on #411 and #412 and should only be reviewed once those are merged.
Summary
This PR replaces the existing merge conflict tests in
MergeConflictTests.swiftwith a new test suite that covers a broader set of scenarios across multiple dimensions:The new tests expose two real bugs in the current merge conflict resolution logic. These are temporarily marked with
withKnownIssue, as the main goal of this PR is to document the current behavior and form a baseline for future work on configurable conflict resolution.Improvements
Posttable type (standalone, no parent entity required) instead ofReminder, which depends onRemindersList.container.privateCloudDatabasedirectly, reducing boilerplate compared to the full container, as the shared database isn’t interesting for these tests.t=30,t=60) for client modification instead of relative increments. This is now aligned with howCKRecords are being treated.Bugs Identified
The new tests reveal the following issues in the current implementation:
Overview
differentFieldsChange_conflictOnSend_clientNewerisPublished@ t=60title@ t=30serverRecordUpdatedBeforeClientRecorddifferentFieldsChange_conflictOnSend_serverNewerisPublished@ t=30title@ t=60clientRecordUpdatedBeforeServerRecorddifferentFieldsChange_conflictOnFetch_clientNewerisPublished@ t=60title@ t=30serverAndClientEditDifferentFieldsdifferentFieldsChange_conflictOnFetch_serverNewerisPublished@ t=30title@ t=60differentNullableFieldsChange_conflictOnFetch_clientNewerpriority@ t=60dueDate@ t=30mergeWithNullableFieldssameFieldChange_conflictOnSend_retryBeforeFetch_clientNewertitle@ t=60title@ t=30sameFieldChange_conflictOnSend_retryBeforeFetch_serverNewertitle@ t=30title@ t=60sameFieldChange_conflictOnSend_fetchBeforeRetry_clientNewertitle@ t=60title@ t=30serverRecordEditedBeforeClientButProcessedAfterClientsameFieldChange_conflictOnSend_fetchBeforeRetry_serverNewertitle@ t=30title@ t=60sameFieldChange_conflictOnSend_equalTimestampstitle@ t=60title@ t=60sameFieldChange_conflictOnFetch_clientNewertitle@ t=60title@ t=30serverRecordEditedAndProcessedBeforeClientsameFieldChange_conflictOnFetch_serverNewertitle@ t=30title@ t=60serverRecordEditedAfterClientButProcessedBeforeClientsameFieldChangeAndRemoval_conflictOnSend_clientNewerbody@ t=60body@ t=30sameFieldChangeAndRemoval_conflictOnSend_serverNewerbody@ t=30body@ t=60sameFieldRemoval_conflictOnSend_clientNewerbody@ t=60body@ t=30body@ t=60body@ t=30sameFieldRemoval_conflictOnSend_serverNewerbody@ t=30body@ t=60body@ t=60body@ t=60Next Steps
I have follow-up PRs ready with minimal changes to fix the issues described above. However, PRs #410, #411, and #412 need to be addressed first before those can be submitted.