-
Notifications
You must be signed in to change notification settings - Fork 11
Update to Electric 1.2.x and electric_client 0.8.0 #121
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
Draft
balegas
wants to merge
11
commits into
main
Choose a base branch
from
claude/update-electric-client-yZezg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Update `electric` dependency to `~> 1.2.4` (dropping support for 1.1.x) - Update `electric_client` dependency to `~> 0.8.0` - Remove `http_api_num_acceptors` workaround (fixed in Electric #2863) - Update storage configuration tests to handle both keyword list and map formats - Add tests for Electric 1.2.x configuration options (live_sse, max_shapes, replication_idle_timeout) - Update README examples to reference Electric 1.2.x - Add migration guide in CHANGELOG for users upgrading from 0.6.1 Breaking changes: - Electric 1.1.x is no longer supported - Users should use `live_sse` instead of `experimental_live_sse` - `ELECTRIC_EXPERIMENTAL_MAX_SHAPES` env var is retired, use `max_shapes` config option
- Update StatusMonitor.mark_connection_pool_ready/2 to /3 (new pool type arg) - Remove ShapeStatus.opts/1 calls (function removed in Electric 1.2.x) - Fix storage format to use keyword lists instead of maps - Implement Inspector.load_supported_features/1 callback - Implement PublicationManager.wait_for_restore/1 callback - Update test helpers for Electric 1.2.x storage format - Change default Postgres port from 55555 to 54321 - Update application tests for Electric 1.2.x compatibility Note: Sandbox mode is not yet compatible with Electric 1.2.x due to Electric.Replication.Supervisor being removed. This will be addressed in a future release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Format application_test.exs to pass mix format --check-formatted - Update example apps to use electric ~> 1.2 (matching phoenix_sync) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sandbox mode is not compatible with Electric 1.2.x due to Electric.Replication.Supervisor being removed. Switch example apps to use embedded mode for testing until sandbox is updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update dev.exs and test.exs configs across all apps to use port 54321 instead of 55555 for PostgreSQL connections. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Comprehensive plan for verifying and updating the Phoenix.Sync.Sandbox to work with Electric 1.2.x, including: - List of all Electric internal APIs used by Sandbox - Risk assessment for each API - Implementation phases - Testing strategy - Success criteria
- Deprecate sandbox mode (incompatible with Electric 1.2.x architecture) - Deprecate LiveView streams (sync_stream/4, sync_stream_update/3) - Update sandbox internals to use Electric.Shapes.Supervisor - Add custom Storage module for sandbox that skips DB snapshots - Add stub modules for ShapeCleaner and ExpiryManager - Implement Inspector.load_supported_features/1 callback - Implement PublicationManager.wait_for_restore/1 callback - Update StatusMonitor calls for Electric 1.2.x API Test infrastructure changes: - Change test mode from :sandbox to :embedded - Exclude :sandbox and :igniter tests by default - Add extract_data_messages/2 helper for response format changes - Remove HTTP mode from parameterized tests (requires running server) - Update CI to use port 54321 and include igniter tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove Phoenix.Sync.Sandbox.Postgres adapter from example apps - Use Ecto.Adapters.Postgres directly (sandbox mode is deprecated) - Remove Phoenix.Sync.Sandbox.start! from data_case.ex - Add .claude/ to .gitignore - Remove internal implementation plan doc 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Updates Phoenix.Sync to work with Electric 1.2.x and electric_client 0.8.0.
Changes
electricdependency to~> 1.2.4(dropping support for Electric 1.1.x)electric_clientdependency to~> 0.8.0http_api_num_acceptorsworkaround (fixed upstream in Electric via #2863)Electric.StatusMonitor.mark_connection_pool_ready/2calls to/3(Electric 1.2.x API change)Inspector.load_supported_features/1callback (new in Electric 1.2.x)PublicationManager.wait_for_restore/1callback (new in Electric 1.2.x)Known Issues
mode: :sandbox) is not yet compatible with Electric 1.2.x due to internal architecture changes (Electric.Replication.Supervisorwas removed). Sandbox mode will be updated in a future release.Migration Guide
If upgrading from Phoenix.Sync 0.6.1 or earlier:
Electric 1.2.x Required: This version requires Electric 1.2.4 or later. Electric 1.1.x is no longer supported.
Deprecated Configuration Options:
experimental_live_ssehas been replaced bylive_ssein Electric 1.2.xELECTRIC_EXPERIMENTAL_MAX_SHAPESenvironment variable has been retired; use themax_shapesconfiguration option insteadNew Configuration Options (Electric 1.2.x):
live_sse: Enable server-sent events for real-time updatesreplication_idle_timeout: Automatically close database connections during idle replication streamsTest plan
🤖 Generated with Claude Code