community-platform
community-platform copied to clipboard
refactor: server collection sync
PR Checklist
- [x] - Commit messages are descriptive, it will be used in our Release Notes
PR Type
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Developer experience (improves developer workflows for contributing to the project)
Description
To follow on from discussions raised in #3472:
- Rename the db collection
stream
method tosyncLocally
and update comments to better reflect how the action uses local caching to minimise server requests - Update default
syncLocally
behavior to stop streaming from server after first response, and provide akeepAlive
option that can be used to override if required - Update debug logging to better track start/end and total docs from sync methods
- Tidy map pin sync method to remove previous workaround in favour of new general method
- Tidy abstractDB interfaces to provide separate entries for DBs that support streaming vs not
Breaking (?)
- There might be some user functionality that depends on live update streaming which is no longer supported (e.g. updated view counters or total comments), although it's hard to tell if this is the case or whether individual docs are polled for updates (hopefully will be picked up in tests). Likely too any functionality that depends on this mechanism will probably need to be refactored anyway to try and make more efficient
Git Issues
Closes #
Screenshots/Videos
Example debug logs track sync operations
What happens next?
Thanks for the contribution! We try to make sure all PRs are reviewed ahead of our monthly maintainers call (first Monday of the month)
If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.
If you need more immediate feedback you can try reaching out on Discord in the Community Platform development
channel.
1 flaky test on run #5471 ↗︎
![]() |
![]() |
![]() |
![]() |
![]() |
Details:
Merge branch 'master' into refactor/server-collection-sync | |||
Project: onearmy-community-platform | Commit: 2e9b493a48 |
||
Status: Passed | Duration: 04:26 💡 | ||
Started: Apr 29, 2024 3:54 PM | Ended: Apr 29, 2024 3:59 PM |
src/integration/profile.spec.ts • 1 flaky test • ci-chrome
Test | Artifacts | |
---|---|---|
[Profile] > [By User] > [Can contact profiles by default] |
Test Replay
Screenshots
Video
|
Review all test suite changes for PR #3474 ↗︎
The test failing remotely is fine for me locally so rerunning the CI while investigating further.
Codecov Report
Attention: Patch coverage is 0%
with 26 lines
in your changes are missing coverage. Please review.
Project coverage is 66.65%. Comparing base (
78e9b9d
) to head (2e9b493
).
Additional details and impacted files
@@ Coverage Diff @@
## master #3474 +/- ##
==========================================
- Coverage 66.67% 66.65% -0.02%
==========================================
Files 427 427
Lines 13460 13464 +4
Branches 2427 2429 +2
==========================================
Hits 8974 8974
- Misses 4440 4444 +4
Partials 46 46
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:tada: This PR is included in version 1.176.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: