Skip to content

Commit

Permalink
Merge branch 'main' into sam/vpn-snooze-initial-support
Browse files Browse the repository at this point in the history
# By Dominik Kapusta (3) and others
# Via GitHub
* main:
  Automatically add Asana task to iOS App Board (#3168)
  [DuckPlayer] 14. Potential fix to crash (#3161)
  New Tab Page Settings (#3140)
  New Tab Page Settings Storage (#3159)
  Prevent endless rekey and tunnel update cycle (#3091)
  tentatively fix content blocking UI test (#3141)
  Update Autofill UI test to reflect updated app copy (#3158)
  Duck player support on RMF (#3146)
  Release 7.131.0-0 (#3157)
  Update BSK with autofill 12.1.0 (#3155)
  Report Autofill issues via Passwords screen (#3116)
  Update GRDB to 2.4.0 (upstream 6.29.0, SQLCipher 4.6.0) (#3153)
  Update fastlane to 2.222.0 (#3154)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Aug 1, 2024
2 parents 1144225 + 9c6924e commit aeb78fb
Show file tree
Hide file tree
Showing 88 changed files with 2,805 additions and 346 deletions.
107 changes: 27 additions & 80 deletions .github/workflows/pr-task-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: Asana PR Task URL

on:
pull_request:
types: [opened, edited, closed, unlabeled, synchronize, review_requested]
types: [opened, edited, closed, synchronize, review_requested]

jobs:

# This job is used to assert that the task linked in the PR description belongs to the specified project (App Board).
assert-project-membership:
# This job is used to check if the task linked in the PR description belongs to the specified project (App Board).
# If that's not the case, the task is added to the project's PR section.
add-task-to-project:

name: Check App Board Project Membership
name: Add Task to App Board Project

runs-on: ubuntu-latest

outputs:
task_id: ${{ steps.get-task-id.outputs.task_id }}
failure: ${{ steps.check-task-url.outputs.failure }}
task_in_project: ${{ steps.check-board-membership.outputs.task_in_project }}

steps:
- name: Get Task ID
Expand All @@ -28,10 +29,9 @@ jobs:
| cut -d '/' -f 4)
echo "task_id=$task_id" >> $GITHUB_OUTPUT
- name: Check Task URL
id: check-task-url
- name: Check App Board Project Membership
id: check-board-membership
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
ASANA_PROJECT_ID: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_ID }}
run: |
Expand All @@ -40,77 +40,24 @@ jobs:
| jq -r .data.projects[].gid)"
if grep -q "\b${{ env.ASANA_PROJECT_ID }}\b" <<< $project_ids; then
echo "failure=0" >> $GITHUB_OUTPUT
echo "task_in_project=1" >> $GITHUB_OUTPUT
else
echo "failure=1" >> $GITHUB_OUTPUT
echo "task_in_project=0" >> $GITHUB_OUTPUT
fi
# If a task URL is present, but task is missing from the App Board project, add a comment to the PR and fail the check.
# Otherwise, delete the comment and pass the check.
update-project-membership-report:

name: App Board Project Membership Report

runs-on: ubuntu-latest
if: github.event.action != 'closed'

needs: [assert-project-membership]

steps:
- name: Comment on the PR
if: ${{ needs.assert-project-membership.outputs.task_id && needs.assert-project-membership.outputs.failure == '1' }}
- name: Add Task to the App Board Project
id: add-task-to-project
if: ${{ github.event.action == 'opened' && steps.check-board-membership.outputs.task_in_project == '0' }}
env:
ASANA_PROJECT_NAME: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_NAME }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: asana-task-check-status
message: |
:no_entry_sign: The Asana task linked in the PR description is not added to ${{ env.ASANA_PROJECT_NAME }} project.
1. Verify that the correct task is linked in the PR.
* :warning: Please use the actual implementation task, rather than the Code Review subtask.
2. Verify that the task is added to ${{ env.ASANA_PROJECT_NAME }} project.
3. When ready, remove the `bot: not in app board` label to retrigger the check.
- name: Add a label to the PR
if: ${{ needs.assert-project-membership.outputs.task_id && needs.assert-project-membership.outputs.failure == '1' }}
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['bot: not in app board']
})
- name: Delete comment on the PR
if: ${{ needs.assert-project-membership.outputs.task_id == '' || needs.assert-project-membership.outputs.failure == '0' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: asana-task-check-status
delete: true

- name: Remove the label from the PR
if: ${{ needs.assert-project-membership.outputs.task_id == '' || needs.assert-project-membership.outputs.failure == '0' }}
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'bot: not in app board'
});
} catch (error) {
if (error.status !== 404) {
throw error;
}
}
- name: Report status
if: ${{ needs.assert-project-membership.outputs.task_id }}
run: exit ${{ needs.assert-project-membership.outputs.failure }}
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
ASANA_PROJECT_ID: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_ID }}
ASANA_PR_SECTION_ID: ${{ vars.IOS_APP_BOARD_PR_SECTION_ID }}
run: |
curl -fLSs -X POST "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}/addProject" \
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
--output /dev/null \
-d "{\"data\": {\"project\": \"${{ env.ASANA_PROJECT_ID }}\", \"section\": \"${{ env.ASANA_PR_SECTION_ID }}\"}}"
# When reviewer is assigned create a subtask in Asana if not existing already
create-asana-pr-subtask-if-needed:
Expand All @@ -120,14 +67,14 @@ jobs:
runs-on: ubuntu-latest
if: github.event.action == 'review_requested'

needs: [assert-project-membership]
needs: [add-task-to-project]

steps:
- name: Create or Update PR Subtask
uses: duckduckgo/apple-toolbox/actions/asana-create-pr-subtask@main
with:
access-token: ${{ secrets.ASANA_ACCESS_TOKEN }}
asana-task-id: ${{ needs.assert-project-membership.outputs.task_id }}
asana-task-id: ${{ needs.add-task-to-project.outputs.task_id }}
github-reviewer-user: ${{ github.event.requested_reviewer.login }}

# When a PR is merged, move the task to the Waiting for Release section of the App Board.
Expand All @@ -138,11 +85,11 @@ jobs:
runs-on: ubuntu-latest
if: github.event.action == 'closed' && github.event.pull_request.merged == true

needs: [assert-project-membership]
needs: [add-task-to-project]

steps:
- name: Move to Waiting for Release
if: ${{ needs.assert-project-membership.result.failure == '0' }}
if: ${{ needs.add-task-to-project.outputs.task_in_project == '1' }}
env:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
ASANA_PROJECT_ID: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_ID }}
Expand All @@ -151,4 +98,4 @@ jobs:
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
--output /dev/null \
-d "{\"data\": {\"task\": \"${{ needs.assert-project-membership.outputs.task_id }}\"}}"
-d "{\"data\": {\"task\": \"${{ needs.add-task-to-project.outputs.task_id }}\"}}"
5 changes: 5 additions & 0 deletions .maestro/release_tests/content-blocking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ tags:
- tapOn: "Don't Send"

- tapOn: "Refresh Page"
- extendedWaitUntil:
notVisible: "Nonsense text that won't exist"
timeout: 2000

- assertVisible: "1 major tracker loaded via script src"

- tapOn:
id: PrivacyIcon
- assertVisible: "Protections are OFF for this site"

4 changes: 2 additions & 2 deletions .maestro/release_tests/password-autofill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tags:
- assertVisible: "[email protected]"
- tapOn: "[email protected]"

- assertVisible: "Unlock to use saved password"
- assertVisible: "Unlock device to use saved password"
- inputText: "passcode"
- pressKey: Enter

Expand All @@ -73,7 +73,7 @@ tags:
- assertVisible: "[email protected]"
- tapOn: "[email protected]"

- assertVisible: "Unlock to use saved password"
- assertVisible: "Unlock device to use saved password"
- inputText: "passcode"
- pressKey: Enter

Expand Down
4 changes: 2 additions & 2 deletions .maestro/setup_ui_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ check_maestro() {
local known_version="1.36.0"

if command -v $command_name > /dev/null 2>&1; then
local version_output=$($command_name -v 2>&1)
local version_output=$($command_name -v 2>&1 | tail -n 1)

local command_version=$(echo $version_output | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')

if [[ $command_version == $known_version ]]; then
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 = 7.130.0
MARKETING_VERSION = 7.131.0
4 changes: 2 additions & 2 deletions Core/AppPrivacyConfigurationDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import BrowserServicesKit
final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"6731933419540cb11a6a0898b0c26bdb\""
public static let embeddedDataSHA = "88b018fcabee20e6a210d3c65f122c0019ca5bb900c9a0148945e4c4c609856d"
public static let embeddedDataETag = "\"fe3d3799b2bb2167720194f93ada4e43\""
public static let embeddedDataSHA = "4039eb5c4fcaa8806f0058b70c96e25db5d21c481e3ad607393726eb9cb0c361"
}

public var embeddedDataEtag: String {
Expand Down
3 changes: 3 additions & 0 deletions Core/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public enum FeatureFlag: String {
case autofillAccessCredentialManagement
case autofillPasswordGeneration
case autofillOnByDefault
case autofillFailureReporting
case incontextSignup
case autoconsentOnByDefault
case history
Expand All @@ -55,6 +56,8 @@ extension FeatureFlag: FeatureFlagSourceProviding {
return .remoteReleasable(.subfeature(AutofillSubfeature.autofillPasswordGeneration))
case .autofillOnByDefault:
return .remoteReleasable(.subfeature(AutofillSubfeature.onByDefault))
case .autofillFailureReporting:
return .remoteReleasable(.feature(.autofillBreakageReporter))
case .incontextSignup:
return .remoteReleasable(.feature(.incontextSignup))
case .autoconsentOnByDefault:
Expand Down
10 changes: 10 additions & 0 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ extension Pixel {
case autofillManagementUpdateLogin

case autofillMultipleAuthCallsTriggered
case autofillLoginsReportFailure
case autofillLoginsReportAvailable
case autofillLoginsReportConfirmationPromptDisplayed
case autofillLoginsReportConfirmationPromptConfirmed
case autofillLoginsReportConfirmationPromptDismissed

case getDesktopCopy
case getDesktopShare
Expand Down Expand Up @@ -1003,6 +1008,11 @@ extension Pixel.Event {
return "m_autofill_management_update_login"

case .autofillMultipleAuthCallsTriggered: return "m_autofill_multiple_auth_calls_triggered"
case .autofillLoginsReportFailure: return "autofill_logins_report_failure"
case .autofillLoginsReportAvailable: return "autofill_logins_report_available"
case .autofillLoginsReportConfirmationPromptDisplayed: return "autofill_logins_report_confirmation_prompt_displayed"
case .autofillLoginsReportConfirmationPromptConfirmed: return "autofill_logins_report_confirmation_prompt_confirmed"
case .autofillLoginsReportConfirmationPromptDismissed: return "autofill_logins_report_confirmation_prompt_dismissed"

case .getDesktopCopy: return "m_get_desktop_copy"
case .getDesktopShare: return "m_get_desktop_share"
Expand Down
7 changes: 5 additions & 2 deletions Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,13 @@ public struct UserDefaultsWrapper<T> {

case duckPlayerMode = "com.duckduckgo.ios.duckPlayerMode"
case duckPlayerAskModeOverlayHidden = "com.duckduckgo.ios.duckPlayerAskModeOverlayHidden"

case userInteractedWithDuckPlayer = "com.duckduckgo.ios.userInteractedWithDuckPlayer"

case vpnRedditWorkaroundInstalled = "com.duckduckgo.ios.vpn.workaroundInstalled"


case newTabPageSectionsSettings = "com.duckduckgo.ios.newTabPage.sections.settings"
case newTabPageShortcutsSettings = "com.duckduckgo.ios.newTabPage.shortcuts.settings"

// Debug keys

case debugNewTabPageSectionsEnabledKey = "com.duckduckgo.ios.debug.newTabPageSectionsEnabled"
Expand Down
Loading

0 comments on commit aeb78fb

Please sign in to comment.