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

feat(@aws-amplify/datastore): selective sync enhancements #7083

Merged
merged 3 commits into from Oct 29, 2020

Conversation

iartemiev
Copy link
Contributor

  • support returning Predicates.ALL from syncExpression - allows clearing the syncExpression at runtime
  • persist lastSyncPredicate to ModelMetadata in order to better detect when the predicates have changed, e.g., if developer stops application, changes the syncExpression and then restart their application.

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

@lgtm-com
Copy link

lgtm-com bot commented Oct 29, 2020

This pull request introduces 1 alert when merging da4b9e4 into cf511b8 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@codecov
Copy link

codecov bot commented Oct 29, 2020

Codecov Report

Merging #7083 into main will decrease coverage by 0.03%.
The diff coverage is 4.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7083      +/-   ##
==========================================
- Coverage   72.98%   72.95%   -0.04%     
==========================================
  Files         213      213              
  Lines       13293    13298       +5     
  Branches     2603     2510      -93     
==========================================
- Hits         9702     9701       -1     
- Misses       3395     3432      +37     
+ Partials      196      165      -31     
Impacted Files Coverage Δ
packages/datastore/src/sync/index.ts 14.53% <0.00%> (-0.54%) ⬇️
packages/datastore/src/datastore/datastore.ts 78.42% <20.00%> (+0.64%) ⬆️
packages/auth/src/OAuth/OAuth.ts 56.11% <0.00%> (ø)
packages/core/src/Credentials.ts 31.51% <0.00%> (ø)
packages/analytics/src/Analytics.ts 63.58% <0.00%> (ø)
packages/datastore/src/sync/outbox.ts 24.00% <0.00%> (ø)
packages/datastore/src/storage/storage.ts 71.66% <0.00%> (ø)
packages/core/src/OAuthHelper/GoogleOAuth.ts 33.33% <0.00%> (ø)
packages/core/src/Util/Reachability.native.ts 37.50% <0.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf511b8...4166d8b. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Oct 29, 2020

This pull request introduces 1 alert when merging a17a614 into cf511b8 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ivan, this looks good! 🌮
Good catch by persisting the predicate!

@iartemiev iartemiev merged commit 2a4d3fd into main Oct 29, 2020
@iartemiev iartemiev deleted the selective-sync branch October 29, 2020 18:02
CryogenicPlanet pushed a commit to MLH-Fellowship/amplify-js that referenced this pull request Jan 20, 2021
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants