Skip to content

Commit

Permalink
Merge branch 'main' into sam/vpn-ui-improvements-bsk-bump
Browse files Browse the repository at this point in the history
# By Dax the Duck (5) and others
# Via GitHub (2) and Chris Brind (1)
* main: (30 commits)
  Update wireguard-apple to 1.1.3 (#2428)
  Improves VPN pixel info and adds tests (#2434)
  DBP: Implement event pixels (#2408)
  Bump BSK (#2435)
  Bump version to 1.80.0 (145)
  Fix syntax in Asana actions
  Bump version to 1.80.0 (144)
  Set marketing version to 1.80.0
  Update embedded files
  DBP: Debug scan model implementation (#2421)
  Roll back CPM post-rollout cleanup (#2430)
  Password Import: Ignore Excluded Sites When Importing from Chrome (#2404)
  Stub objects for Bookmarks DB (#2418)
  Properly handle edge cases (#2417)
  DBP: Treat 404 as failure instead of error (#2426)
  DBP: Use url instead of name to identify brokers on pixels (#2423)
  Fix determining if internal release should be automatically bumped
  Renamed some pixel parameters to be more clear (#2402)
  Update broker json (#2407)
  bump bsk to fix retain cycle (#2425)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Mar 18, 2024
2 parents 84831d9 + db0c6e6 commit 30d12ef
Show file tree
Hide file tree
Showing 155 changed files with 4,508 additions and 943 deletions.
2 changes: 1 addition & 1 deletion .github/actions/asana-create-action-item/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ runs:
task-url: ${{ inputs.release-task-url }}

- id: get-asana-user-id
if: github.event_name != "schedule"
if: github.event_name != 'schedule'
uses: duckduckgo/apple-infra/actions/asana-get-user-id-for-github-handle@main
with:
access-token: ${{ inputs.access-token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/asana-log-message/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
task-url: ${{ inputs.task-url }}

- id: get-asana-user-id
if: github.event_name != "schedule"
if: github.event_name != 'schedule'
uses: duckduckgo/apple-infra/actions/asana-get-user-id-for-github-handle@main
with:
access-token: ${{ inputs.access-token }}
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,21 @@ jobs:
echo "skip-release=false" >> $GITHUB_OUTPUT
else
latest_tag="$(git describe --tags --abbrev=0)"
changed_files="$(git diff --name-only "$latest_tag".."origin/${release_branch}" | grep -v -E '.github|scripts')"
latest_tag_sha="$(git rev-parse "$latest_tag")"
release_branch_sha="$(git rev-parse "origin/${release_branch}")"
if [[ ${#changed_files} == 0 ]]; then
echo "::warning::No changes to the release branch (or only scripts and workflows). Skipping automatic release."
if [[ "${latest_tag_sha}" == "${release_branch_sha}" ]]; then
echo "::warning::Release branch's HEAD is already tagged. Skipping automatic release."
echo "skip-release=true" >> $GITHUB_OUTPUT
else
echo "skip-release=false" >> $GITHUB_OUTPUT
changed_files="$(git diff --name-only "$latest_tag".."origin/${release_branch}")"
if grep -q -v -e '.github' -e 'scripts' <<< "$changed_files"; then
echo "::warning::New code changes found in the release branch since the last release. Will bump internal release now."
echo "skip-release=false" >> $GITHUB_OUTPUT
else
echo "::warning::No changes to the release branch (or only changes to scripts and workflows). Skipping automatic release."
echo "skip-release=true" >> $GITHUB_OUTPUT
fi
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 142
CURRENT_PROJECT_VERSION = 145
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development
GENERATE_INFOPLIST_FILE = YES
INFOPLIST_FILE = NetworkProtectionSystemExtension/Info.plist
INFOPLIST_KEY_NSHumanReadableCopyright = Copyright © 2023 DuckDuckGo. All rights reserved.
INFOPLIST_KEY_NSSystemExtensionUsageDescription = Network Protection
INFOPLIST_KEY_NSSystemExtensionUsageDescription = DuckDuckGo VPN

FEATURE_FLAGS[arch=*][sdk=*] = NETP_SYSTEM_EXTENSION NETWORK_EXTENSION NETWORK_PROTECTION
FEATURE_FLAGS[config=CI][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION NETWORK_EXTENSION NETWORK_PROTECTION
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Global.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SWIFT_COMPILATION_MODE = wholemodule
SWIFT_COMPILATION_MODE[config=CI][arch=*][sdk=*] =
SWIFT_COMPILATION_MODE[config=Debug][arch=*][sdk=*] =

// This is temporarily set back to its default value, as a part of merging Network Protection. There are a small number of warnings introduced in
// This is temporarily set back to its default value, as a part of merging the VPN. There are a small number of warnings introduced in
// that feature, and more time is needed to address them. To avoid bothering other developers, this is being disabled and a task to fix it will be
// prioritized.
SWIFT_STRICT_CONCURRENCY = minimal;
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.79.0
MARKETING_VERSION = 1.80.0
78 changes: 66 additions & 12 deletions DuckDuckGo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "c8ed701b513cf5177118a175d85fbbbcd707ab41",
"version" : "1.3.0"
"revision" : "46989693916f56d1186bd59ac15124caef896560",
"version" : "1.3.1"
}
},
{
Expand Down Expand Up @@ -176,8 +176,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/wireguard-apple",
"state" : {
"revision" : "2d8172c11478ab11b0f5ad49bdb4f93f4b3d5e0d",
"version" : "1.1.1"
"revision" : "13fd026384b1af11048451061cc1b21434990668",
"version" : "1.1.3"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<Test
Identifier = "PixelStoreTests/testWhenValuesAreRemovedThenTheyAreNotInCache()">
</Test>
<Test
Identifier = "PreferencesSidebarModelTests/testWhenResetTabSelectionIfNeededCalledThenPreferencesTabIsSelected()">
</Test>
<Test
Identifier = "StatisticsLoaderTests/testWhenRefreshRetentionAtbIsPerformedForNavigationThenAppRetentionAtbRequested()">
</Test>
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/Application/URLEventHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
import AppKit

#if NETWORK_PROTECTION
import NetworkProtection
import NetworkProtectionUI
#endif

#if DBP
Expand Down
Binary file modified DuckDuckGo/Assets.xcassets/Images/ITR-Icon.imageset/ITR-Icon.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions DuckDuckGo/Assets.xcassets/Images/QandA-128.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "QandA-128.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
25 changes: 19 additions & 6 deletions DuckDuckGo/Bookmarks/Model/Bookmark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,32 @@ internal class BaseBookmarkEntity: Identifiable {

static func singleEntity(with uuid: String) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == %@ AND %K == NO", #keyPath(BookmarkEntity.uuid), uuid, #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == %@ AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid), uuid,
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

static func favorite(with uuid: String, favoritesFolder: BookmarkEntity) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == %@ AND %K CONTAINS %@ AND %K == NO AND %K == NO",
request.predicate = NSPredicate(format: "%K == %@ AND %K CONTAINS %@ AND %K == NO AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid),
uuid as CVarArg,
#keyPath(BookmarkEntity.favoriteFolders),
favoritesFolder,
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion))
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

static func entities(with identifiers: [String]) -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K IN %@ AND %K == NO", #keyPath(BookmarkEntity.uuid), identifiers, #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K IN %@ AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.uuid), identifiers,
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down Expand Up @@ -98,7 +105,10 @@ final class BookmarkFolder: BaseBookmarkEntity {

static func bookmarkFoldersFetchRequest() -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == YES AND %K == NO", #keyPath(BookmarkEntity.isFolder), #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == YES AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down Expand Up @@ -135,7 +145,10 @@ final class Bookmark: BaseBookmarkEntity {

static func bookmarksFetchRequest() -> NSFetchRequest<BookmarkEntity> {
let request = BookmarkEntity.fetchRequest()
request.predicate = NSPredicate(format: "%K == NO AND %K == NO", #keyPath(BookmarkEntity.isFolder), #keyPath(BookmarkEntity.isPendingDeletion))
request.predicate = NSPredicate(format: "%K == NO AND %K == NO AND (%K == NO OR %K == nil)",
#keyPath(BookmarkEntity.isFolder),
#keyPath(BookmarkEntity.isPendingDeletion),
#keyPath(BookmarkEntity.isStub), #keyPath(BookmarkEntity.isStub))
return request
}

Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/Common/Extensions/NSAlertExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ extension NSAlert {

static func resetNetworkProtectionAlert() -> NSAlert {
let alert = NSAlert()
alert.messageText = "Reset Network Protection?"
alert.messageText = "Reset VPN?"
alert.informativeText = """
This will remove your stored network configuration (including private key) and disable the VPN.
You can re-enable the VPN from the Network Protection view.
You can re-enable the VPN from the status view.
"""
alert.alertStyle = .warning
alert.addButton(withTitle: "Reset")
Expand All @@ -108,7 +108,7 @@ extension NSAlert {
let sysExText = ""
#endif
alert.messageText = "Uninstall \(sysExText)Login Items?"
alert.informativeText = "This will remove the Network Protection \(sysExText)Status Menu icon and disable the VPN."
alert.informativeText = "This will remove the VPN \(sysExText)Status Menu icon and disable the VPN."
alert.alertStyle = .warning
alert.addButton(withTitle: "Uninstall")
alert.addButton(withTitle: UserText.cancel)
Expand Down
Loading

0 comments on commit 30d12ef

Please sign in to comment.