feat(sync-service): remove subquery feature flags - #4741
Open
robacourt wants to merge 2 commits into
Open
Conversation
…re flags Subqueries in shape WHERE clauses (including incremental move handling for compound AND/OR/NOT expressions) are now permanently enabled. Remove the `allow_subqueries` and `tagged_subqueries` feature flags and the code that only existed to support their disabled paths. - config: empty `@known_feature_flags`; the generic ELECTRIC_FEATURE_FLAGS mechanism is retained for future flags but has none defined - shape: drop `check_feature_flag/2` — subqueries always allowed - consumer/state: drop the `allow_subqueries` disjunct; non-subquery shapes keep fragment streaming (unchanged production behavior) - dependency move policy collapses to always stream: remove `dependency_move_policy` from ShapeInfo/EventHandlerBuilder, the `:invalidate_on_dependency_move` clause in Steady, and the now-unreachable `:unsupported_subquery` handler in Consumer - tests: drop `@tag allow_subqueries: false` and `feature_flags` args; remove obsolete invalidate-policy tests - docs: reframe subqueries as GA (no preview/flag language); trim compose env Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
commit: |
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4741 +/- ##
==========================================
- Coverage 60.06% 60.02% -0.05%
==========================================
Files 397 397
Lines 43766 43766
Branches 12587 12587
==========================================
- Hits 26290 26271 -19
- Misses 17395 17413 +18
- Partials 81 82 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Subqueries in shape WHERE clauses are now permanently enabled and treated as a generally-available feature. This removes the two gating flags —
allow_subqueriesandtagged_subqueries— so there is no way to turn subqueries off, and cleans up the code that only existed to support their disabled paths.Changes
@known_feature_flagsand simplify thefeature_flagsdefault. The genericELECTRIC_FEATURE_FLAGSmechanism (env var, parsing, plumbing) is intentionally retained for future flags — it just has no flags defined now.allow_subqueriesremoval:shape.ex: dropcheck_feature_flag/2— subqueries are always allowed.consumer/state.ex: drop the"allow_subqueries" in feature_flagsdisjunct. Non-subquery shapes keep fragment streaming, matching current production behavior; only shapes with dependencies / inner subquery shapes use full-txn buffering.tagged_subqueriesremoval — the dependency move policy collapses to always stream:event_handler_builder.ex: removedependency_move_policy/2.subqueries/shape_info.ex: remove thedependency_move_policyfield and type.event_handler/subqueries/steady.ex: remove the:invalidate_on_dependency_moveclause that returned{:error, :unsupported_subquery}.consumer.ex: remove the now-unreachable:unsupported_subqueryerror handler.@tag allow_subqueries: falsetags + the setup conditional, stripfeature_flags: ["allow_subqueries"]args, and delete the two obsolete invalidate-policy tests.shapes.md(section/anchor renamed to#subqueries), collapse theconfig.mdFeature Flags section to a minimalELECTRIC_FEATURE_FLAGSentry, move subqueries out of "Unsupported" in the client skill, and drop theELECTRIC_FEATURE_FLAGSline from the agents-server dev compose.Notes
With the test-env
feature_flagsdefault now empty and theallow_subqueriesdisjunct gone, simple non-subquery shapes exercise fragment streaming by default in tests (matching production) rather than txn-buffering. The full suite passes under that.Test Plan
mix format --check-formattedcleanmix compile --warnings-as-errorsclean (confirms no dead clauses / unused vars)ELECTRIC_FEATURE_FLAGSset (covered byserve_shape_plug_test/subqueries_test)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.