Repository navigation
feat(sync-service): Re-enable pluggable snapshot function - #3444
Merged
Merged
Conversation
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3444 +/- ##
==========================================
+ Coverage 67.55% 67.59% +0.04%
==========================================
Files 180 180
Lines 9672 9675 +3
Branches 359 360 +1
==========================================
+ Hits 6534 6540 +6
+ Misses 3136 3133 -3
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
magnetised
force-pushed
the
magnetised/pluggable-snapshot-function
branch
from
November 18, 2025 10:13
aa390a0 to
213d82d
Compare
magnetised
marked this pull request as ready for review
November 18, 2025 10:29
Phoenix.Sync relies on patching the snapshot function in its sandbox repo feature (where it uses an Ecto.Repo instance to get a pool connection and returns fake xids). When we removed dependency injection we broke this, so this PR just adds back in the ability to inject a custom stream_snapshot_from_db/5 function. I also removed the requirement to pass seed_config to the stack config instance by adding in defaults for most of the required values and removed the unused `shape_changes_registry` value from the stack config. We have defaults for these values so we should use them. Generally if we add config we should have a default -- it makes Phoenix.Sync less likely to break with every addition. In DynamicConsumerSupervisor I noticed a potential problem where the DynamicSupervisor spec passed to PartitionSupervisor could have a `name` which would cause problems.
magnetised
force-pushed
the
magnetised/pluggable-snapshot-function
branch
from
November 19, 2025 09:19
213d82d to
b6ecba1
Compare
alco
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phoenix.Sync relies on patching the snapshot function in its sandbox repo feature (where it uses an Ecto.Repo instance to get a pool connection and returns fake xids). When we removed dependency injection we broke this, so this PR just adds back in the ability to inject a custom stream_snapshot_from_db/5 function.
I also removed the requirement to pass seed_config to the stack config instance by adding in defaults for most of the required values and removed the unused
shape_changes_registryvalue from the stack config. We have defaults for these values so we should use them. Generally if we add config we should have a default -- it makes Phoenix.Sync less likely to break with every addition.In DynamicConsumerSupervisor I noticed a potential problem where the DynamicSupervisor spec passed to PartitionSupervisor could have a
namewhich would cause problems.