Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(predictions): use serial queue for WebSocketSession delegate queue #3935

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

thisisabhash
Copy link
Member

Issue #

Customers have reported receiving intermittent InvalidSignatureException during liveness checks.

Description

According to Apple docs, URLSession delegate queue should use a serial queue for delegate and completion handler callbacks. This PR updates the URLSession initializer with a serial queue.
Also, calls to WebSocketSession object APIs are put under a serial queue as well.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@thisisabhash thisisabhash requested a review from a team as a code owner December 10, 2024 00:03
@thisisabhash thisisabhash force-pushed the fix/liveness-websocketsession-delegatequeue branch from 36c09fc to 2cdaf7f Compare January 3, 2025 18:10
@thisisabhash thisisabhash force-pushed the fix/liveness-websocketsession-delegatequeue branch from 2cdaf7f to 57b2fe4 Compare January 3, 2025 18:44
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 67.75%. Comparing base (abd17e5) to head (57b2fe4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...sPlugin/Liveness/Service/FaceLivenessSession.swift 0.00% 8 Missing ⚠️
...ionsPlugin/Liveness/Service/WebSocketSession.swift 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3935      +/-   ##
==========================================
- Coverage   67.76%   67.75%   -0.02%     
==========================================
  Files        1125     1125              
  Lines       52117    52126       +9     
==========================================
  Hits        35316    35316              
- Misses      16801    16810       +9     
Flag Coverage Δ
API_plugin_unit_test 70.33% <ø> (ø)
AWSPluginsCore 70.36% <ø> (ø)
Amplify 47.89% <ø> (ø)
Analytics_plugin_unit_test 85.20% <ø> (ø)
Auth_plugin_unit_test 73.65% <ø> (+0.01%) ⬆️
DataStore_plugin_unit_test 83.36% <ø> (-0.06%) ⬇️
Geo_plugin_unit_test 74.86% <ø> (ø)
Logging_plugin_unit_test 63.11% <ø> (ø)
Predictions_plugin_unit_test 35.42% <0.00%> (-0.08%) ⬇️
PushNotifications_plugin_unit_test 88.43% <ø> (ø)
Storage_plugin_unit_test 76.92% <ø> (+0.04%) ⬆️
unit_tests 67.75% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thisisabhash thisisabhash merged commit b247482 into main Jan 3, 2025
92 checks passed
@thisisabhash thisisabhash deleted the fix/liveness-websocketsession-delegatequeue branch January 3, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants