Skip to content

Scoped feature flags 1/3: scope declaration and per-replica override plumbing#37079

Merged
antiguru merged 1 commit into
MaterializeInc:mainfrom
antiguru:claude/scoped-flags-1-foundation
Jun 17, 2026
Merged

Scoped feature flags 1/3: scope declaration and per-replica override plumbing#37079
antiguru merged 1 commit into
MaterializeInc:mainfrom
antiguru:claude/scoped-flags-1-foundation

Conversation

@antiguru

@antiguru antiguru commented Jun 16, 2026

Copy link
Copy Markdown
Member

Motivation

First of a three-PR stack splitting #36959 (scoped feature flags) for review:
1/3 (this) → 2/3 #37080 → 3/3 #36959. Design:
doc/developer/design/20260609_scoped_feature_flags.md (#36947).

This PR is the additive foundation: it introduces the vocabulary the later PRs
build on, with no behavior change on its own.

Description

  • ParameterScope (Environment / Cluster / Replica), declared on system
    vars and dyncfg Configs and carried through to the synced system vars. The
    declaration is the single source of truth for which contexts get evaluated.
  • The size-family taxonomy: ReplicaAllocation::family plus a size-map family
    field, with a cc / legacy fallback for sizes that don't set one.
  • The compute controller's per-replica dyncfg override layer
    (update_replica_dyncfg_overrides + per-replica command specialization),
    inert until the adapter wires it in 3/3.

Nothing consumes the scope or the override layer yet, so this is a no-op.

Verification

test_replica_allocation_family covers the size→family fallback; the rest is
exercised by the later PRs in the stack.

Comment thread src/controller/src/clusters.rs
Comment thread src/compute-client/src/controller/instance.rs

@DAlperin DAlperin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thanks

@aljoscha aljoscha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! I did have some inline comments that I'm sure the ai can easily clean up

Comment thread src/sql/src/session/vars/definitions.rs
Comment thread src/sql/src/session/vars/definitions.rs Outdated
Comment thread src/sql/src/session/vars/definitions.rs Outdated
Comment thread src/sql/src/session/vars/definitions.rs Outdated
Comment thread src/sql/src/session/vars/definitions.rs Outdated
The additive foundation for scoped feature flags, with no behavior change on its
own.

* `ParameterScope` (Environment / Cluster / Replica), declared on system vars
  and dyncfg `Config`s and carried through to the synced system vars.
* The size-family taxonomy: `ReplicaAllocation::family` with a size-map `family`
  field and a `cc`/`legacy` fallback for unset sizes.
* The compute controller's per-replica dyncfg override layer
  (`update_replica_dyncfg_overrides`) and per-replica command specialization,
  unused until the adapter wires it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antiguru antiguru force-pushed the claude/scoped-flags-1-foundation branch from d822816 to 620b77f Compare June 17, 2026 12:00
@antiguru antiguru enabled auto-merge (squash) June 17, 2026 12:16
@antiguru antiguru merged commit a8f4526 into MaterializeInc:main Jun 17, 2026
128 checks passed
@antiguru antiguru deleted the claude/scoped-flags-1-foundation branch June 17, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants