Repository navigation
feat(sync-service): remove subquery feature flags - #4741
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>
| @build_env Mix.env() | ||
|
|
||
| @known_feature_flags ~w[allow_subqueries tagged_subqueries] | ||
| @known_feature_flags ~w[] |
There was a problem hiding this comment.
This probably causes a compilation warning for unused attribute, so it may need to be commented out
There was a problem hiding this comment.
There's no warning because it's still used elsewhere (like line 787). This is to leave the ability for feature flags while not actually having any active feature flags.
|
This PR has been released! 🚀 The following packages include changes from this PR:
Thanks for contributing to Electric! |
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.