Skip to content

Commit

Permalink
Merge branch 'main' into bartek/update-data-debugging
Browse files Browse the repository at this point in the history
# By Dax the Duck (8) and others
# Via GitHub (5) and Alexey Martemyanov (2)
* main: (44 commits)
  Add RMF `messageShown` attribute (#3062)
  Update autoconsent to v10.13.0 (#3063)
  [DuckPlayer] 1. Move Extension to BSK and add Init Updates (#3055)
  Bump version to 1.100.0 (238)
  Bump version to 1.100.0 (237)
  Improve sorting logic and related test (#3064)
  VPN Waitlist and Debug Menu code cleanup. (#3059)
  restore CrashLogMessageExtractor (#3011)
  xattr command removed from the restarting script to avoid the macOS notification (#3057)
  Duck Player - Improved Settings + Ship Review feedback (#2981)
  Fix flaky TabContentTests (#3060)
  PIR Database Migrations: Remove Temporary Internal Time-Based Feature Flag (#3054)
  Bump version to 1.100.0 (236)
  Remove unused messaging system (#3047)
  Automatically add Asana task to macOS App Board (#3053)
  Disable password generation for burner windows (#3024)
  PIR: Improve sorting logic and related test (#3049)
  Remove @mainactor from test case class definitions (#3048)
  Fix autoplay FF behavior (#3032)
  Fix ghost InfoPlist.xcstrings (#3044)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Aug 4, 2024
2 parents 546219f + 149b303 commit c8dd5e4
Show file tree
Hide file tree
Showing 171 changed files with 20,798 additions and 2,686 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_appstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

name: Make App Store Connect Release

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge

env:
destination: ${{ github.event.inputs.destination || inputs.destination }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_hotfix_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: Update Asana tasks

needs: run_tests
runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_notarized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:

name: Export Notarized App

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge

outputs:
app-version: ${{ steps.set-outputs.outputs.app-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

# This doesn't need Xcode, so could technically run on Ubuntu, but find_asana_release_task.sh
# uses BSD-specific `date` syntax, that doesn't work with GNU `date` (available on Linux).
runs-on: macos-13
runs-on: macos-14
timeout-minutes: 10

outputs:
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
name: Increment Build Number

needs: [ validate_input_conditions, run_tests ]
runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

name: Create Release Branch

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

outputs:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
name: Increment Build Number

needs: [ create_release_branch, run_tests ]
runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

name: Set Up Variants

runs-on: macos-13
runs-on: macos-14
timeout-minutes: 15

outputs:
Expand All @@ -76,7 +76,7 @@ jobs:

name: Download Release App and upload artifact

runs-on: macos-13
runs-on: macos-14
timeout-minutes: 15

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

name: Create Release Branch

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

outputs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

name: Test Shell Scripts

runs-on: macos-13
runs-on: macos-14

steps:
- name: Check out the code
Expand Down Expand Up @@ -88,6 +88,7 @@ jobs:
name: Test

strategy:
fail-fast: false
matrix:
flavor: [ "Sandbox", "Non-Sandbox" ]
include:
Expand All @@ -108,7 +109,7 @@ jobs:
- cache-key: sandbox-
flavor: Sandbox

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 30

outputs:
Expand Down Expand Up @@ -288,7 +289,7 @@ jobs:
# workflow_call is used by bump_internal_release and is followed by a proper release job
if: github.actor != 'dependabot[bot]' && (github.event_name == 'push' || github.event_name == 'pull_request')

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 30

steps:
Expand Down
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.MACOS_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.MACOS_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.MACOS_APP_BOARD_ASANA_PROJECT_ID }}
ASANA_PR_SECTION_ID: ${{ vars.MACOS_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.MACOS_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 }}\"}}"
2 changes: 1 addition & 1 deletion .github/workflows/publish_dmg_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# or failed (for public releases or hotfixes), because tagging doesn't block publishing the release
if: always()

runs-on: macos-13-xlarge
runs-on: macos-14-xlarge
timeout-minutes: 10

steps:
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/sync_end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
fail-fast: false
matrix:
runner: [macos-13-xlarge, macos-14-xlarge]
include:
- xcode-version: "15.2"
runner: macos-13-xlarge
- xcode-version: "15.4"
runner: macos-14-xlarge

timeout-minutes: 60

Expand Down Expand Up @@ -58,7 +63,10 @@ jobs:
NETP_NOTIFICATIONS_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_NOTIFICATIONS_REVIEW_PROVISION_PROFILE_BASE64 }}

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer
run: |
# Override .xcode_version because 15.4 is not available on macos 13
echo "${{ matrix.xcode-version }}" > .xcode-version
sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer
- name: Create test account for Sync and return the recovery code
uses: duckduckgo/sync_crypto/action@main
Expand All @@ -81,6 +89,17 @@ jobs:
env:
CODE: ${{ steps.sync-recovery-code.outputs.recovery-code }}
run: |
# Set CODE environment variable in the scheme definition, since Xcode 15.4 doesn't
# seem to recognize global environment variables otherwise.
# We use xmlstarlet to edit the scheme XML file.
brew install xmlstarlet
xmlstarlet ed -i '/Scheme/LaunchAction/EnvironmentVariables/EnvironmentVariable[1]' -t elem -n "EnvironmentVariable" \
-i '/Scheme/LaunchAction/EnvironmentVariables/EnvironmentVariable[1]' -t attr -n "key" -v "CODE" \
-i '/Scheme/LaunchAction/EnvironmentVariables/EnvironmentVariable[1]' -t attr -n "value" -v "$CODE" \
-i '/Scheme/LaunchAction/EnvironmentVariables/EnvironmentVariable[1]' -t attr -n "isEnabled" -v "YES" \
"DuckDuckGo.xcodeproj/xcshareddata/xcschemes/Sync End-to-End UI Tests.xcscheme" > updated.xcscheme
mv -f updated.xcscheme "DuckDuckGo.xcodeproj/xcshareddata/xcschemes/Sync End-to-End UI Tests.xcscheme"
defaults write com.duckduckgo.macos.browser.review sync.environment Development
defaults write com.duckduckgo.macos.browser.review moveToApplicationsFolderAlertSuppress 1
set -o pipefail && xcodebuild test-without-building \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

# This doesn't need Xcode, so could technically run on Ubuntu, but actions that add comments and tasks
# in Asana use BSD-specific sed syntax, that doesn't work with GNU sed (available on Linux).
runs-on: macos-13
runs-on: macos-14

env:
asana-task-url: ${{ github.event.inputs.asana-task-url || inputs.asana-task-url }}
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
fail-fast: false
matrix:
runner: [macos-13-xlarge, macos-14-xlarge]
include:
- xcode-version: "15.2"
runner: macos-13-xlarge
- xcode-version: "15.4"
runner: macos-14-xlarge

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.runner }}
Expand Down Expand Up @@ -66,7 +71,10 @@ jobs:
NETP_NOTIFICATIONS_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_NOTIFICATIONS_REVIEW_PROVISION_PROFILE_BASE64 }}

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer
run: |
# Override .xcode_version because 15.4 is not available on macos 13
echo "${{ matrix.xcode-version }}" > .xcode-version
sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer
- name: Build for testing
run: |
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.2
15.4
1 change: 1 addition & 0 deletions Configuration/App/DuckDuckGoAppStore.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PRODUCT_BUNDLE_IDENTIFIER = $(MAIN_BUNDLE_IDENTIFIER)

CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAppStore.entitlements
CODE_SIGN_ENTITLEMENTS[config=CI][arch=*][sdk=*] = DuckDuckGo/DuckDuckGoAppStoreCI.entitlements
CODE_SIGN_ENTITLEMENTS[config=Debug][arch=*][sdk=*] = DuckDuckGo/DuckDuckGoAppStoreDebug.entitlements

CODE_SIGN_IDENTITY[sdk=macosx*] = 3rd Party Mac Developer Application
CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development
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 = 232
CURRENT_PROJECT_VERSION = 238
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.99.0
MARKETING_VERSION = 1.100.0
Loading

0 comments on commit c8dd5e4

Please sign in to comment.