Skip to content

fix(datastore): propagate remote mutationEvents to Hub for sync received #3697

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

Merged

Conversation

5d
Copy link
Contributor

@5d 5d commented May 14, 2024

Issue #

#2684

Description

As we introduce lazy loading support in Datastore v2, the observe API requires the model instance in the stream to have accurate information for data related to lazy loading. However, the syncReceived hub event should still propagate the mutation event data from AppSync, which includes metadata such as _version, _deleted, and _lastChangedAt.

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.

@5d 5d had a problem deploying to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d had a problem deploying to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d had a problem deploying to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 21:37 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 22:59 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 22:59 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 22:59 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest May 14, 2024 23:24 — with GitHub Actions Inactive
@5d 5d marked this pull request as ready for review May 15, 2024 22:06
@5d 5d requested a review from a team as a code owner May 15, 2024 22:06
@5d 5d merged commit 7415441 into flutter-datastore-v2 May 16, 2024
132 of 133 checks passed
@5d 5d deleted the 5d/hub-event-sync-received-with-remote-model branch May 16, 2024 17:30
5d added a commit that referenced this pull request Jun 3, 2024
…LBehavior (#3666)

* WIP

* DataStore compiles without SDK dependency

* refactor(datastore-v2): use api plugin with async sequences

* change to use Publisher operators for auth type streams

* add nondeterminsitc operation for better testability

* fix unit test cases

* fix broken unit test cases of AWSAPIPlugin

* fix broken AWSDataStorePlugin unit test cases

* fix OutgoingMutationQueue test case

* remove unused methods

* fix broken test cases of SyncMutationToCloudOperationTests

* fix broken unit test cases of API and DataStore

* resolve plugins build issues (#3654)

* remove lock from SyncMutationToCloudOperation

* remove test case of retryable for signOut error

* resolve comments

* fix(datastore): propagate remote mutationEvents to Hub for sync received (#3697)

* rename the package to InternalAmplifyCredentials

* rewrite NondeterminsticOperation constructor with makeStream

* resolve broken test case after merging latest orgin/main

* feat(amplify): make GraphQLOperationType extends from String (#3719)

* refactor(datastore): new enum to represent inferred and designated authType (#3694)

* refactor(datastore): new enum to represent inferred and designated auth type

* resolve failed multi auth integ tests

* resolve comments

* fix(datastore): use error description to produce clearer error info (#3733)

---------

Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
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