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

RDART-973: Add support for the new progress notifications #1546

Merged
merged 22 commits into from
Jun 25, 2024

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented Mar 8, 2024

Fixes #1564

TODO:

  • Changelog

* main: (28 commits)
  Wrong test for local development (#1591)
  Add vNext Changelog header (#1589)
  [Release 2.0.0-beta.2] (#1588)
  Update melos to 5.2.0 (#1587)
  RDART-977: Hierarchical logger (#1574)
  Fix release workflow (#1582)
  RDART-978: Add support RealmValue.fromJson (#1581)
  Fix oversight in install command
  Add vNext Changelog header (#1579)
  [Release 2.0.0-beta.1] (#1577)
  RDART-976: Fix install command (#1576)
  Update build instructions and switching Flutter/Dart versions (#1571)
  gitignore release folder
  Remove incorrectly committed files
  Cleanup changelog, bring back melos publishing (#1573)
  Add vNext Changelog header (#1572)
  [Release 2.0.0-alpha.5] (#1570)
  Revert "Copy symlinks for realm_dart"
  Copy symlinks for realm_dart
  Fix changelog
  ...

# Conflicts:
#	packages/realm_dart/lib/src/session.dart
#	packages/realm_dart/src/realm-core
#	packages/realm_dart/test/realm_test.dart
#	packages/realm_dart/test/session_test.dart
#	packages/realm_dart/test/test.dart
* main:
  Add vNext Changelog header (#1594)
  [Release 2.0.0] (#1593)
  Cleanup the changelog for 2.0.0 (#1592)
@nirinchev nirinchev requested a review from nielsenko April 9, 2024 12:55
@nirinchev nirinchev marked this pull request as ready for review April 9, 2024 12:55
@nirinchev nirinchev changed the title Add support for the new progress notifications RDART-973: Add support for the new progress notifications Apr 9, 2024
Copy link
Contributor

@nielsenko nielsenko left a comment

Choose a reason for hiding this comment

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

LGTM.

Perhaps you could elaborate a bit on the explanation of the test?

Comment on lines +217 to +230
// We should not see more updates in either direction
final uploadCallbacks = uploadData.callbacksInvoked;
final downloadCallbacks = downloadData.callbacksInvoked;

uploadRealm.write(() {
uploadRealm.add(NullableTypes(ObjectId(), differentiator, stringProp: generateRandomString(50)));
});

await uploadRealm.syncSession.waitForUpload();
await downloadRealm.syncSession.waitForDownload();

expect(uploadRealm.all<NullableTypes>().length, downloadRealm.all<NullableTypes>().length);
expect(uploadData.callbacksInvoked, uploadCallbacks);
expect(downloadData.callbacksInvoked, downloadCallbacks);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you elaborate the explanation of this part a bit? Why will we not see more upload callbacks here, when we add and wait for upload?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the subscription we setup is for ProgressMode.forCurrentlyOutstandingWork, which ends when you've reached 100% and no further callbacks will be invoked as more data comes in/goes out.

@@ -418,7 +418,7 @@ void setupTests() {

Realm.logger.setLogLevel(LogLevel.detail);
Realm.logger.onRecord.listen((record) {
testing.printOnFailure('${record.category} ${record.level.name}: ${record.message}');
testing.printOnFailure('${DateTime.now().toUtc()} ${record.category} ${record.level.name}: ${record.message}');
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@nielsenko
Copy link
Contributor

Some test failures needs to be resolved

* main: (37 commits)
  RDART-930: Refactor handles (#1550)
  Forgot to show GeoPolygon
  Add vNext Changelog header (#1687)
  [Release 2.3.0] (#1686)
  RDART-1028: Use Zone.current.bindUnaryCallbackGuarded for RawReceivePort.handler (#1683)
  RDART-1021: Wire up some basic dynamic setting and change notifications (#1669)
  RDART-1022: Drop x86 as target (#1682)
  RDART-1034: Update realm-core to v14.7.0 (#1681)
  Skip select test
  RDART-1018: Fix badly generated _fromJson (#1664)
  Add vNext Changelog header (#1660)
  [Release 2.2.1] (#1659)
  Update CHANGELOG.md
  RDART-1016: Cleanup iOS podspec (#1658)
  Add vNext Changelog header (#1655)
  [Release 2.2.0] (#1654)
  RDART-1015: Update core to v14.6.2 (#1651)
  RDART-950: Update nullability annotations for base url API (#1652)
  RDART-964: Add PrivacyInfo.xcprivacy for iOS and macOS (#1646)
  RDART-1014: Bump required sdk version to ^3.3.0 (#1648)
  ...

# Conflicts:
#	CHANGELOG.md
#	packages/realm_dart/lib/src/native/realm_core.dart
#	packages/realm_dart/src/realm-core
#	packages/realm_dart/test/realm_test.dart
#	packages/realm_dart/test/session_test.dart
#	packages/realm_dart/test/test.dart
* main:
  RDART-1031: Disable codesign for apple binaries (#1694)
  RDART-1038: Drop keep alive hack (#1691)
Copy link

coveralls-official bot commented May 27, 2024

Pull Request Test Coverage Report for Build 9649570041

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 86.939%

Totals Coverage Status
Change from base Build 9648084030: -0.007%
Covered Lines: 5984
Relevant Lines: 6883

💛 - Coveralls

nirinchev added 6 commits May 29, 2024 23:56
* main:
  Add vNext Changelog header (#1717)
  [Release 3.0.0] (#1716)
  libraryVersion moved to realm_libary.dart (take 2)
  libraryVersion moved to realm_libary.dart
  Update CHANGELOG (#1715)
  Github composite action for setting up flutter on runner (#1710)
  RDART-866: kn/decimal128 web support (#1713)
  Reduce expected gain of memEquals for test stability
  Refresh after awaiting download to stabilize tests
  RDART-866: Minimal web support (#1699)
  RDART-1052: Update realm-core to v14.9.0 (#1704)
  RDART-1020: Fix writeAsync behaviour (#1666)
  RDART-999: Fix flutter test dlopen (#1623)
  RDART-1045: Expose setrlimit ios (#1700)
  RDART-962: Use xcode 15.4 (#1548)
  RDART-1039: Drop catalyst support. Flutter doesn't support it (#1696)

# Conflicts:
#	packages/realm_dart/src/realm-core
* main:
  RDART-969: Keypath filtering on collections (#1714)
* main:
  Compensate for breaking change in sane_uuid (#1730)
@nirinchev nirinchev merged commit 52e3470 into main Jun 25, 2024
59 checks passed
@nirinchev nirinchev deleted the ni/progress-notifications branch June 25, 2024 11:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the new sync progress estimates
2 participants