← 输入框|github.com|刷新
Skip to content

fix: Allow scaling a FeatureStore whose online store is disabled - #7070

Open
NopeCharon wants to merge 2 commits into
feast-dev:masterfrom
NopeCharon:fix/operator-scaling-disabled-online-store
Open

NopeCharon wants to merge 2 commits into
feast-dev:masterfrom
NopeCharon:fix/operator-scaling-disabled-online-store

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The CEL rule that guards horizontal scaling (spec.replicas > 1 or services.scaling.autoscaling) always required services.onlineStore.persistence.store. A FeatureStore that sets services.onlineStore.disabled: true deploys no online store pod or persistence, but it still failed admission with "Scaling requires DB-backed persistence for the online store". So a registry-only, offline-only or UI-only FeatureStore could not be scaled or used as an HPA target. The scaling guide already says the DB-backed requirement covers only enabled services.

This PR lets the online store rule pass when the online store is explicitly disabled:

has(self.services) && has(self.services.onlineStore) &&
  ((has(self.services.onlineStore.disabled) && self.services.onlineStore.disabled) ||
   (has(self.services.onlineStore.persistence) && has(self.services.onlineStore.persistence.store)))

The issue also suggests allowing an omitted onlineStore block and an omitted registry. I left those out on purpose. When onlineStore is omitted, ApplyDefaultsToStatus still deploys the online store with file-based (SQLite) defaults. When there is no registry, each pod falls back to its own file registry. Both setups break with several replicas, and the existing tests should reject scaling when online store is missing (implicit file default) and should reject scaling when no registry is configured (implicit file default) cover that intent. The offline store and registry rules are unchanged, so a FeatureStore with a disabled online store still needs a DB-backed, S3/GCS or remote registry to scale.

Changes:

  • api/v1/featurestore_types.go: online store scaling rule and message.
  • Regenerated config/crd/bases/feast.dev_featurestores.yaml (make manifests) and dist/install.yaml (make build-installer). The rule appears twice in each file, under spec and status.applied.
  • scaling_test.go: envtest cases that accept static replicas and autoscaling with a disabled online store, plus one that still rejects a disabled online store without a registry.
  • docs/how-to-guides/scaling-feast.md: explains that an omitted online store counts as enabled, and how to scale a FeatureStore that runs without one.

Which issue(s) this PR fixes:

Fixes #6865

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Misc

I ran the operator test packages against envtest (Kubernetes 1.31.0): cmd, internal/controller, internal/controller/services and test/api all pass. With the rule change reverted, the two new "accept" cases fail with the online store CEL error.

The CEL rule that guards horizontal scaling required
services.onlineStore.persistence.store unconditionally. That made it
impossible to set spec.replicas > 1 or services.scaling.autoscaling on a
FeatureStore that sets services.onlineStore.disabled, such as a
registry-only or offline-only FeatureStore, even though no online store
pod or persistence is deployed for it. The scaling docs already say the
DB-backed requirement applies to enabled services only.

Let the online store rule also pass when the online store is explicitly
disabled. An omitted onlineStore block is still rejected, because the
operator deploys the online store with file-based defaults in that case.
The offline store and registry rules are unchanged, so a disabled online
store still needs a DB-backed, object-store or remote registry to scale.

Regenerate the CRD and dist/install.yaml, add envtest cases for static
replicas and autoscaling with a disabled online store, and document the
behaviour in the scaling guide.

Fixes feast-dev#6865

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
@NopeCharon
NopeCharon requested a review from a team as a code owner October 25, 2026 10:54
@codecov-commenter

codecov-commenter commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.99%. Comparing base (1e5e90c) to head (7ca6f9a).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7070      +/-   ##
==========================================
+ Coverage   50.97%   50.99%   +0.01%     
==========================================
  Files         455      455              
  Lines       56994    56994              
  Branches     8321     8321              
==========================================
+ Hits        29055    29063       +8     
+ Misses      25954    25946       -8     
  Partials     1985     1985              
Flag Coverage Δ
go-feature-server 30.58% <ø> (+0.20%) ⬆️
python-unit 52.45% <ø> (ø)
see 1 file with indirect coverage changes

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e5e90c...7ca6f9a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Regenerate bundle/manifests/feast.dev_featurestores.yaml so it matches
config/crd/bases after the scaling rule change, fixing the bundle sync
check in operator-test.

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Allow standalone registry/offline/UI/MCP FeatureStores to autoscale independently of the online store

2 participants