Skip to content

Commit

Permalink
Enable field validation for Sync payloads (#2807)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1207196051122978/f

Description:
This change adds a mechanism that filters out syncable objects that would fail validation on the backend
before sending Sync patch request. Objects rejected from patch payload are retried on every subsequent
Sync request, until they're updated to pass validation or deleted.
  • Loading branch information
ayoy authored May 5, 2024
1 parent ffc7248 commit 41aa2a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9718,7 +9718,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 143.0.1;
version = 144.0.0;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "dedd5ef4cc71379e43cbd8244374a53043163e21",
"version" : "143.0.1"
"revision" : "9906b9464f6f12e94f3cc62456b5b5a9c1a43db8",
"version" : "144.0.0"
}
},
{
Expand Down Expand Up @@ -129,7 +129,7 @@
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "46989693916f56d1186bd59ac15124caef896560",
"version" : "1.3.1"
Expand Down
4 changes: 1 addition & 3 deletions DuckDuckGo/SyncSettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ class SyncSettingsViewController: UIHostingController<SyncSettingsView> {
setUpFaviconsFetcherSwitch(viewModel)
setUpFavoritesDisplayModeSwitch(viewModel, appSettings)
setUpSyncPaused(viewModel, appSettings)
if DDGSync.isFieldValidationEnabled {
setUpSyncInvalidObjectsInfo(viewModel)
}
setUpSyncInvalidObjectsInfo(viewModel)
setUpSyncFeatureFlags(viewModel)
refreshForState(syncService.authState)

Expand Down

0 comments on commit 41aa2a0

Please sign in to comment.