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(Auth): Fixing a retain cycle when configuring Auth and listening for updates #3599

Closed
wants to merge 1 commit into from

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Apr 5, 2024

Description

This PR addresses a retain cycle that happened when the Auth plugin was added due to the fact that Task retains self and we were iterating through a never-ending AsyncSequence.

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.

@ruisebas ruisebas requested a review from a team as a code owner April 5, 2024 18:31
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.52%. Comparing base (946600a) to head (5ddf2a7).
Report is 3 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3599      +/-   ##
==========================================
- Coverage   68.53%   68.52%   -0.01%     
==========================================
  Files        1084     1084              
  Lines       36975    36975              
==========================================
- Hits        25339    25338       -1     
- Misses      11636    11637       +1     
Flag Coverage Δ
API_plugin_unit_test 67.82% <ø> (ø)
AWSPluginsCore 68.64% <ø> (ø)
Amplify 48.21% <ø> (ø)
Analytics_plugin_unit_test 81.16% <ø> (ø)
Auth_plugin_unit_test 79.03% <100.00%> (+0.02%) ⬆️
CoreMLPredictions_plugin_unit_test 59.44% <ø> (ø)
DataStore_plugin_unit_test 82.33% <ø> (-0.06%) ⬇️
Geo_plugin_unit_test 70.75% <ø> (ø)
Logging_plugin_unit_test 62.87% <ø> (ø)
Predictions_plugin_unit_test 37.10% <ø> (ø)
PushNotifications_plugin_unit_test 87.13% <ø> (ø)
Storage_plugin_unit_test 77.61% <ø> (ø)
unit_tests 68.52% <100.00%> (-0.01%) ⬇️

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.

@ruisebas ruisebas closed this Apr 5, 2024
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.

None yet

2 participants