-
Notifications
You must be signed in to change notification settings - Fork 15
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
refactor: implement new slow sync - WPB-10727 #1999
base: develop
Are you sure you want to change the base?
Conversation
…endpoint, add UTs - WPB-10727
…o, add UT - WPB-10727
Test Results289 tests 289 ✅ 6s ⏱️ Results for commit f5820cb. ♻️ This comment has been updated with latest results. |
WireDomain/Sources/WireDomain/UseCases/OneOnOneResolverUseCase.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Repositories/Team/TeamRepository.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Repositories/Team/TeamRepository.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Synchronization/SyncManager.swift
Outdated
Show resolved
Hide resolved
WireDomain/Tests/WireDomainTests/Synchronization/SyncManagerTests.swift
Outdated
Show resolved
Hide resolved
…ix UTs - WPB-10727 (#1999)
.../UpdateEventsAPI/Event decoding/Conversation/ConversationReceiptModeUpdateEventDecoder.swift
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Repositories/User/UserRepository.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Repositories/Team/TeamRepository.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Synchronization/OneOnOneResolver.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Synchronization/SyncManager.swift
Outdated
Show resolved
Hide resolved
WireDomain/Sources/WireDomain/Synchronization/SyncManager.swift
Outdated
Show resolved
Hide resolved
enum Error: Swift.Error { | ||
case failedToPerformSlowSync(Swift.Error) | ||
} |
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.
Perhaps SyncManagerError
, this way we avoid having to fully qualify Swift.Error
?
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.
Since the enum is nested inside the SyncManager, we know the error is a SyncManager error, also it feels more intuitive at callsite: SyncManager.Error
rather than SyncManager.SyncManagerError
which seems redundant. It is also aligned with what we did for processors.
On a more general perspective, I would go with either of the two following approaches:
1/ Call it NameOfTheObjectError but don't nest it inside the object
2/ Call it Error and have it nested inside the object.
Both solutions work for me, in WireDomain we use both approaches though, we should streamline this to one or the other solution.
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.
We could also nest it and call it Failure
.
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 in e151fbc
…er file, clean up code - WPB-10727 (#1999)
This PR is stale because it has been open 30 days with no activity. Please update it or close it in case is not relevant anymore. |
Key points
This PR is about performing a slow sync to get the database initially up-to-date by triggering necessary calls to repositories and use cases.
Dedicated repositories and use cases will pull and store up-to-date objects into the database.
Testing
UTs cover the following use cases, ensuring that
Checklist
[WPB-XXX]
.UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: