From 1b8b8f9db3f53f5d42c17d581362d1f1adffb8ed Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 10 Mar 2025 14:53:25 -0700 Subject: [PATCH 1/3] fix(predictions): use UTC timezone in date formatter --- .../Liveness/Service/WebSocketSession.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/WebSocketSession.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/WebSocketSession.swift index 5888cde6e4..a3da120ead 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/WebSocketSession.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/WebSocketSession.swift @@ -128,7 +128,9 @@ final class WebSocketSession { } let dateFormatter = DateFormatter() + dateFormatter.locale = Locale(identifier: "en_US_POSIX") dateFormatter.dateFormat = "EEE, d MMM yyyy HH:mm:ss z" + dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) guard let serverDate = dateFormatter.date(from: dateString) else { Amplify.log.verbose("\(#function): Error parsing Date header in expected format") onServerDateReceived(nil) From 2e9a59cff42cef9991f99ad2f16c4d5150fbb6d1 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 10 Mar 2025 15:12:58 -0700 Subject: [PATCH 2/3] fix failing CI --- .github/workflows/build_scheme.yml | 4 ++-- .github/workflows/integ_test_auth_webauthn.yml | 4 ++-- .github/workflows/integ_test_push_notifications.yml | 4 ++-- .github/workflows/run_integration_tests.yml | 4 ++-- .github/workflows/run_unit_tests.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_scheme.yml b/.github/workflows/build_scheme.yml index 0eed66e6e8..1b1cff73db 100644 --- a/.github/workflows/build_scheme.yml +++ b/.github/workflows/build_scheme.yml @@ -78,7 +78,7 @@ jobs: - name: Save the dependencies cache in main if: inputs.save_build_cache && steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main' - uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: ${{ steps.dependencies-cache.outputs.cache-primary-key }} @@ -93,7 +93,7 @@ jobs: - name: Save the build cache if: inputs.save_build_cache && github.ref_name == 'main' - uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: ${{ steps.build-cache.outputs.cache-primary-key }} \ No newline at end of file diff --git a/.github/workflows/integ_test_auth_webauthn.yml b/.github/workflows/integ_test_auth_webauthn.yml index 6ca33f92a1..d508bbc628 100644 --- a/.github/workflows/integ_test_auth_webauthn.yml +++ b/.github/workflows/integ_test_auth_webauthn.yml @@ -47,7 +47,7 @@ jobs: id: dependencies-cache timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: amplify-packages-${{ hashFiles('Package.resolved') }} @@ -59,7 +59,7 @@ jobs: if: steps.dependencies-cache.outputs.cache-hit timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: Amplify-iOS-build-cache diff --git a/.github/workflows/integ_test_push_notifications.yml b/.github/workflows/integ_test_push_notifications.yml index 54bd4fb44c..cb5296a9c1 100644 --- a/.github/workflows/integ_test_push_notifications.yml +++ b/.github/workflows/integ_test_push_notifications.yml @@ -70,7 +70,7 @@ jobs: id: dependencies-cache timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: amplify-packages-${{ hashFiles('Package.resolved') }} @@ -82,7 +82,7 @@ jobs: if: steps.dependencies-cache.outputs.cache-hit timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: Amplify-${{ matrix.platform }}-build-cache diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index d7c86d0a51..e3a56d6bc5 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -73,7 +73,7 @@ jobs: id: dependencies-cache timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: amplify-packages-${{ hashFiles('Package.resolved') }} @@ -85,7 +85,7 @@ jobs: if: steps.dependencies-cache.outputs.cache-hit timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: Amplify-${{ inputs.platform }}-build-cache diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index 28a352338f..5df7d18589 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -61,7 +61,7 @@ jobs: id: dependencies-cache timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: amplify-packages-${{ hashFiles('Package.resolved') }} @@ -73,7 +73,7 @@ jobs: if: steps.dependencies-cache.outputs.cache-hit timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: Amplify-${{ inputs.platform }}-build-cache From d1b8b4bbec51275ff6b357320bf4f4d0e8ec7199 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 10 Mar 2025 15:17:26 -0700 Subject: [PATCH 3/3] Add missing changes --- .github/workflows/build_scheme.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_scheme.yml b/.github/workflows/build_scheme.yml index 1b1cff73db..4c66363d65 100644 --- a/.github/workflows/build_scheme.yml +++ b/.github/workflows/build_scheme.yml @@ -47,7 +47,7 @@ jobs: id: dependencies-cache timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ~/Library/Developer/Xcode/DerivedData/Amplify key: amplify-packages-${{ hashFiles('Package.resolved') }} @@ -59,7 +59,7 @@ jobs: if: steps.dependencies-cache.outputs.cache-hit timeout-minutes: 4 continue-on-error: true - uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: ${{ github.workspace }}/Build key: Amplify-${{ inputs.platform }}-build-cache