Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 3eaf24c

Browse files
Merge branch 'diego/feature-network-protection-onboarding' into diego/netp-new-onboarding
2 parents 2017648 + 5b10101 commit 3eaf24c

File tree

43 files changed

+2474
-1111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2474
-1111
lines changed

.github/workflows/build_notarized.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ on:
8181
required: true
8282
MM_WEBHOOK_URL:
8383
required: true
84+
AWS_ACCESS_KEY_ID:
85+
required: true
86+
AWS_SECRET_ACCESS_KEY:
87+
required: true
88+
8489

8590
jobs:
8691
export-notarized-app:

.github/workflows/pr.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ jobs:
154154
check_name: "Test Report: ${{ matrix.flavor }}"
155155
report_paths: ${{ matrix.flavor }}.xml
156156

157+
- name: Update Asana with failed unit tests
158+
if: always() # always run even if the previous step fails
159+
env:
160+
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
161+
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
162+
run: |
163+
# Extract failed tests from the junit report
164+
# Only keep failures unique by classname and name (column 1 and 2 of the yq output)
165+
yq < ${{ matrix.flavor }}.xml -p xml -o json -r \
166+
$'[.testsuites.testsuite[].testcase] | flatten | map(select(.failure) | .+@classname + " " + .+@name + " \'" + .failure.+@message + "\' ${{ env.WORKFLOW_URL }}") | .[]' \
167+
| sort -u -k 1,2 \
168+
| xargs -L 1 ./scripts/report-failed-unit-test.sh
169+
157170
- name: Upload failed test log
158171
uses: actions/upload-artifact@v3
159172
if: failure()
@@ -303,3 +316,24 @@ jobs:
303316
run: |
304317
git update-index --refresh
305318
git diff-index --quiet HEAD --
319+
320+
asana:
321+
name: Create Asana Task
322+
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]
323+
324+
if: failure() && github.ref_name == 'develop'
325+
326+
env:
327+
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
328+
329+
runs-on: ubuntu-latest
330+
331+
steps:
332+
- name: Create Asana Task
333+
uses: malmstein/github-asana-action@master
334+
with:
335+
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
336+
asana-project: ${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}
337+
asana-task-name: 'PR Check is failing on develop'
338+
action: create-asana-task
339+
asana-task-description: PR Checks conducted after merging have failed. See ${{ env.WORKFLOW_URL }}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
4040
MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }}
4141
MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
42+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
43+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4244

4345
appstore-release:
4446
name: Prepare AppStore Release
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CURRENT_PROJECT_VERSION = 47
1+
CURRENT_PROJECT_VERSION = 49

Configuration/Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MARKETING_VERSION = 1.51.0
1+
MARKETING_VERSION = 1.52.0

DuckDuckGo.xcodeproj/project.pbxproj

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,8 @@
910910
37197EAC294244D600394917 /* FutureExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B634DBE6293C98C500C3C99E /* FutureExtension.swift */; };
911911
371C0A2927E33EDC0070591F /* FeedbackPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371C0A2827E33EDC0070591F /* FeedbackPresenter.swift */; };
912912
371D00E129D8509400EC8598 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 371D00E029D8509400EC8598 /* OpenSSL */; };
913+
372BC2A12A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */; };
914+
372BC2A22A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */; };
913915
3739326529AE4B39009346AE /* DDGSync in Frameworks */ = {isa = PBXBuildFile; productRef = 3739326429AE4B39009346AE /* DDGSync */; };
914916
3739326729AE4B42009346AE /* DDGSync in Frameworks */ = {isa = PBXBuildFile; productRef = 3739326629AE4B42009346AE /* DDGSync */; };
915917
373A1AA8283ED1B900586521 /* BookmarkHTMLReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373A1AA7283ED1B900586521 /* BookmarkHTMLReader.swift */; };
@@ -989,6 +991,8 @@
989991
37CD54CE27F2FDD100F1F7B9 /* PreferencesSidebarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C627F2FDD100F1F7B9 /* PreferencesSidebarModel.swift */; };
990992
37CD54CF27F2FDD100F1F7B9 /* AppearancePreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C727F2FDD100F1F7B9 /* AppearancePreferences.swift */; };
991993
37CD54D027F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C827F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift */; };
994+
37CEFCA92A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */; };
995+
37CEFCAA2A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */; };
992996
37D2377A287EB8CA00BCE03B /* TabIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D23779287EB8CA00BCE03B /* TabIndex.swift */; };
993997
37D2377C287EBDA300BCE03B /* TabIndexTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D2377B287EBDA300BCE03B /* TabIndexTests.swift */; };
994998
37D23780287EFEE200BCE03B /* PinnedTabsManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D2377F287EFEE200BCE03B /* PinnedTabsManagerTests.swift */; };
@@ -2216,6 +2220,7 @@
22162220
3714B1E628EDB7FA0056C57A /* DuckPlayerPreferencesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuckPlayerPreferencesTests.swift; sourceTree = "<group>"; };
22172221
3714B1E828EDBAAB0056C57A /* DuckPlayerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuckPlayerTests.swift; sourceTree = "<group>"; };
22182222
371C0A2827E33EDC0070591F /* FeedbackPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackPresenter.swift; sourceTree = "<group>"; };
2223+
372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncCredentialsAdapter.swift; sourceTree = "<group>"; };
22192224
373A1AA7283ED1B900586521 /* BookmarkHTMLReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkHTMLReader.swift; sourceTree = "<group>"; };
22202225
373A1AA9283ED86C00586521 /* BookmarksHTMLReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksHTMLReaderTests.swift; sourceTree = "<group>"; };
22212226
373A1AAF2842C4EA00586521 /* BookmarkHTMLImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkHTMLImporter.swift; sourceTree = "<group>"; };
@@ -2289,6 +2294,7 @@
22892294
37CD54C627F2FDD100F1F7B9 /* PreferencesSidebarModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreferencesSidebarModel.swift; sourceTree = "<group>"; };
22902295
37CD54C727F2FDD100F1F7B9 /* AppearancePreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearancePreferences.swift; sourceTree = "<group>"; };
22912296
37CD54C827F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultBrowserPreferences.swift; sourceTree = "<group>"; };
2297+
37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CredentialsCleanupErrorHandling.swift; sourceTree = "<group>"; };
22922298
37D23779287EB8CA00BCE03B /* TabIndex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabIndex.swift; sourceTree = "<group>"; };
22932299
37D2377B287EBDA300BCE03B /* TabIndexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabIndexTests.swift; sourceTree = "<group>"; };
22942300
37D2377F287EFEE200BCE03B /* PinnedTabsManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedTabsManagerTests.swift; sourceTree = "<group>"; };
@@ -3591,7 +3597,9 @@
35913597
373D9B4729EEAC1B00381FDD /* SyncMetadataDatabase.swift */,
35923598
37445F982A1566420029F789 /* SyncDataProviders.swift */,
35933599
37445F9B2A1569F00029F789 /* SyncBookmarksAdapter.swift */,
3600+
372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */,
35943601
37FD78102A29EBD100B36DB1 /* SyncErrorHandler.swift */,
3602+
37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */,
35953603
);
35963604
path = Sync;
35973605
sourceTree = "<group>";
@@ -6820,13 +6828,13 @@
68206828
isa = PBXNativeTarget;
68216829
buildConfigurationList = AA585DA4248FD31500E9A3E2 /* Build configuration list for PBXNativeTarget "DuckDuckGo Privacy Browser" */;
68226830
buildPhases = (
6823-
B6F2C8722A7A4C7D000498CF /* Make /Applications symlink, remove app on Clean build */,
68246831
CBCCF59E299667B700C02DFE /* Assert Xcode version */,
68256832
3705272528992C8A000C06A2 /* Check Embedded Config URLs */,
68266833
AA585D7A248FD31100E9A3E2 /* Sources */,
68276834
AA8EDF2824925E940071C2E8 /* Swift Lint */,
68286835
AA585D7B248FD31100E9A3E2 /* Frameworks */,
68296836
AA585D7C248FD31100E9A3E2 /* Resources */,
6837+
B6F2C8722A7A4C7D000498CF /* Make /Applications symlink, remove app on Clean build */,
68306838
4B2D065D2A11D2AE00DE1F49 /* Embed Login Items */,
68316839
4B5F14F32A14823D0060320F /* Embed NetP Controller Apps */,
68326840
4B5F14F62A14825A0060320F /* Replace VPN Controllers with Symlinks */,
@@ -7741,6 +7749,7 @@
77417749
3706FB64293F65D500E42796 /* PixelDataModel.xcdatamodeld in Sources */,
77427750
B626A75B29921FAA00053070 /* NavigationActionPolicyExtension.swift in Sources */,
77437751
3706FB65293F65D500E42796 /* PrivacyDashboardWebView.swift in Sources */,
7752+
372BC2A22A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */,
77447753
3706FB66293F65D500E42796 /* AppearancePreferences.swift in Sources */,
77457754
3706FB67293F65D500E42796 /* DownloadListCoordinator.swift in Sources */,
77467755
3706FB68293F65D500E42796 /* NSNotificationName+Debug.swift in Sources */,
@@ -7889,6 +7898,7 @@
78897898
3706FBDB293F65D500E42796 /* DefaultBrowserPreferences.swift in Sources */,
78907899
3706FBDC293F65D500E42796 /* Permissions.xcdatamodeld in Sources */,
78917900
3706FBDD293F65D500E42796 /* PaddedImageButton.swift in Sources */,
7901+
37CEFCAA2A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */,
78927902
3706FBDE293F65D500E42796 /* EncryptionKeyStoring.swift in Sources */,
78937903
4B4D60E32A0C883A00BCD287 /* Main.swift in Sources */,
78947904
37197EA12942441700394917 /* Tab+UIDelegate.swift in Sources */,
@@ -8670,6 +8680,7 @@
86708680
37AFCE9227DB8CAD00471A10 /* PreferencesAboutView.swift in Sources */,
86718681
9826B0A02747DF3D0092F683 /* ContentBlocking.swift in Sources */,
86728682
4B379C2227BDBA29008A968E /* LocalAuthenticationService.swift in Sources */,
8683+
37CEFCA92A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */,
86738684
4BB99D0326FE191E001E4761 /* SafariBookmarksReader.swift in Sources */,
86748685
1DA6D0FD2A1FF9A100540406 /* HTTPCookie.swift in Sources */,
86758686
AACF6FD626BC366D00CF09F9 /* SafariVersionReader.swift in Sources */,
@@ -8955,6 +8966,7 @@
89558966
85CC1D7B26A05ECF0062F04E /* PasswordManagementItemListModel.swift in Sources */,
89568967
AABEE6A924AB4B910043105B /* SuggestionTableCellView.swift in Sources */,
89578968
AA6820F125503DA9005ED0D5 /* FireViewModel.swift in Sources */,
8969+
372BC2A12A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */,
89588970
AAA0CC6A253CC43C0079BC96 /* WKUserContentControllerExtension.swift in Sources */,
89598971
4BE65479271FCD41008D1D63 /* EditableTextView.swift in Sources */,
89608972
AA9FF95D24A1FA1C0039E328 /* TabCollection.swift in Sources */,
@@ -10225,7 +10237,7 @@
1022510237
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
1022610238
requirement = {
1022710239
kind = exactVersion;
10228-
version = 73.0.0;
10240+
version = 74.0.1;
1022910241
};
1023010242
};
1023110243
AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = {

DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DuckDuckGo/AppDelegate/AppDelegate.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel
289289
.removeDuplicates()
290290
.sink { isSyncDisabled in
291291
LocalBookmarkManager.shared.updateBookmarkDatabaseCleanupSchedule(shouldEnable: isSyncDisabled)
292+
syncDataProviders.credentialsAdapter.updateDatabaseCleanupSchedule(shouldEnable: isSyncDisabled)
292293
}
293294

294295
// This is also called in applicationDidBecomeActive, but we're also calling it here, since
@@ -300,6 +301,14 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel
300301

301302
self.syncDataProviders = syncDataProviders
302303
self.syncService = syncService
304+
305+
bookmarksManager.bookmarkDatabaseCleaner.isSyncActive = { [weak self] in
306+
self?.syncService?.authState == .active
307+
}
308+
309+
syncDataProviders.credentialsAdapter.databaseCleaner.isSyncActive = { [weak self] in
310+
self?.syncService?.authState == .active
311+
}
303312
}
304313

305314
// MARK: - Network Protection

DuckDuckGo/Autoconsent/autoconsent-bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DuckDuckGo/Bookmarks/Model/BookmarkManager.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ final class LocalBookmarkManager: BookmarkManager {
6565
self.faviconManagement = faviconManagement
6666
}
6767

68+
let bookmarkDatabaseCleaner = BookmarkDatabaseCleaner(
69+
bookmarkDatabase: BookmarkDatabase.shared.db,
70+
errorEvents: BookmarksCleanupErrorHandling(),
71+
log: .bookmarks
72+
)
73+
6874
@Published private(set) var list: BookmarkList?
6975
var listPublisher: Published<BookmarkList?>.Publisher { $list }
7076

7177
private lazy var bookmarkStore: BookmarkStore = LocalBookmarkStore(bookmarkDatabase: BookmarkDatabase.shared)
7278
private lazy var faviconManagement: FaviconManagement = FaviconManager.shared
73-
private lazy var bookmarkDatabaseCleaner = BookmarkDatabaseCleaner(
74-
bookmarkDatabase: BookmarkDatabase.shared.db,
75-
errorEvents: BookmarksCleanupErrorHandling(),
76-
log: .bookmarks
77-
)
7879

7980
// MARK: - Bookmarks
8081

0 commit comments

Comments
 (0)