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(datastore): Ignore ApiAuthExceptions when subscribing or syncing models #2561

Merged
merged 10 commits into from
Aug 23, 2023

Conversation

mattcreaser
Copy link
Member

@mattcreaser mattcreaser commented Aug 16, 2023

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:
#2399

Description of changes:

  • Api category emits an ApiAuthException from MultiAuthSubscriptionOperation if authTypes are exhausted when trying to establish a subscription (this is already how the multi-auth sync worked, and appeared to be the intended implementation based on existing code comments).
  • Datastore ignores ApiAuthException encountered when starting the SubscriptionProcessor and the SyncProcessor. This effectively skips those models and allows syncing/subscribing to continue for other models.

How did you test these changes?

  • Used schema from issue and verified that DataStore starts normally after fix.

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #2561 (d53948f) into main (e6c2aa1) will increase coverage by 0.26%.
The diff coverage is 60.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #2561      +/-   ##
==========================================
+ Coverage   41.16%   41.43%   +0.26%     
==========================================
  Files         874      874              
  Lines       27635    27644       +9     
  Branches     3880     3883       +3     
==========================================
+ Hits        11375    11453      +78     
+ Misses      15039    14962      -77     
- Partials     1221     1229       +8     

@mattcreaser mattcreaser marked this pull request as ready for review August 18, 2023 18:35
@mattcreaser mattcreaser requested a review from a team as a code owner August 18, 2023 18:35
@ankpshah
Copy link
Contributor

This PR fixes #1394 as well

@mattcreaser mattcreaser enabled auto-merge (squash) August 22, 2023 21:04
@mattcreaser mattcreaser merged commit 07c0de3 into main Aug 23, 2023
1 check passed
@mattcreaser mattcreaser deleted the mattcreaser/multiauth-start branch August 23, 2023 17:04
@jamesclement jamesclement mentioned this pull request Jan 17, 2024
1 task
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.

5 participants