| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
The red `unit-test-python (3.11, macos-14)` leg is an unrelated CI flake, not caused by this change (which is Go-only, scoped to `infra/feast-operator/`): ``` A `feast apply` subprocess timed out after 120s on the macOS-14 runner. The macOS-3.12 leg and all Ubuntu legs (3.10/3.11/3.12) passed on this same commit, and `operator-test` is green. I do not have permission to re-run the job from the fork — a maintainer re-run of that single leg should clear it. |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR updates the Feast Kubernetes operator’s defaulting logic so an online store service is only deployed when spec.services.onlineStore is explicitly declared, matching the existing behavior for registry and offlineStore. This enables FeatureStore deployments that intentionally omit the online store (e.g., registry-only / offline-only patterns).
Changes:
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| infra/feast-operator/internal/controller/services/util.go | Stop implicitly creating online-store defaults unless the online store is declared. |
| infra/feast-operator/internal/controller/services/util_test.go | Add regression/unit tests for online-store defaulting behavior. |
| infra/feast-operator/internal/controller/services/tls_test.go | Explicitly declare onlineStore so TLS defaulting assertions remain valid. |
| infra/feast-operator/internal/controller/services/repo_config_test.go | Adjust expectations/helpers to reflect that online store is no longer implicit. |
| infra/feast-operator/internal/controller/featurestore_controller_test.go | Ensure test FeatureStores declare onlineStore where required for validity. |
| infra/feast-operator/internal/controller/featurestore_controller_loglevel_test.go | Explicitly include onlineStore in the test services spec. |
| infra/feast-operator/internal/controller/featurestore_controller_cronjob_test.go | Ensure test FeatureStores declare onlineStore where required for validity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| // Only apply online store defaults when the online store is declared, so a | ||
| // FeatureStore can omit spec.services.onlineStore (mirroring registry and | ||
| // offlineStore) and not have an online store deployed. (#6586) | ||
| if services.OnlineStore != nil { | ||
| if services.OnlineStore.Persistence == nil { |
|
@nikolauspschuetz instead I think fix should be to allow online server deployment to opt-out. |
Sorry, something went wrong.
|
Thanks @ntkathole — that makes sense for backward compatibility. Omitting onlineStore today implicitly deploys one, so flipping that default (what this PR currently does) is a breaking change on upgrade for anyone relying on the implicit default. To make it opt-out instead, I'd keep the current default-on behavior and add an explicit disable switch on the online store spec, mirroring the existing DisableInitContainers idiom already in the CRD: type OnlineStore struct {
// Disabled skips deploying the online store service.
// +optional
Disabled bool `json:"disabled,omitempty"`
Server *ServerConfigs `json:"server,omitempty"`
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
// ...
}ApplyDefaultsToStatus would skip the onlineStore defaulting/deployment when disabled is true; omitting the block keeps deploying it exactly as before. The standalone-registry / federated pattern from #6586 would then be expressed explicitly as spec.services.onlineStore.disabled: true. One clarification so I build the right thing: do you want the opt-out at the whole online-store level (skip both persistence and the serving pod), or only the online server (serving pod), keeping the online store config? Happy to rework the PR either way once you confirm. |
Sorry, something went wrong.
opt-out at the whole onlineStore level (disabled: true), not server-only. |
Sorry, something went wrong.
|
Thanks — reworked it to opt-out. The default is back to deploying the online store, so nothing changes on upgrade for existing setups. Setting spec.services.onlineStore.disabled: true now skips it entirely (serving pod and persistence), which covers the registry-only / offline-only case from #6586. It's gated through isOnlineStore(), so metrics and the service monitor drop off with it too. |
Sorry, something went wrong.
|
@nikolauspschuetz Please resolve conflicts |
Sorry, something went wrong.
|
Rebased onto master and resolved the conflict, @ntkathole. The only conflict was in .secrets.baseline (a shifted line_number and the generated_at timestamp — my disabled field pushed the tracked line in featurestore_types.go from 937 to 941); the operator code merged cleanly. Ran the operator suite locally against the envtest harness (k8s 1.31.0) after the rebase — internal/controller/services passes, including the isOnlineStore / disabled: true cases in util_test.go. Ready for another look. |
Sorry, something went wrong.
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #6591 +/- ##
=======================================
Coverage 46.35% 46.35%
=======================================
Files 414 414
Lines 50052 50052
Branches 7151 7151
=======================================
Hits 23201 23201
Misses 25229 25229
Partials 1622 1622
Continue to review full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
…he online store The operator always deploys an online store, forcing a serving pod and persistence onto registry-only or offline-only FeatureStores (feast-dev#6586). Add a `disabled` field on the online store spec to opt those deployments out explicitly. Deployment is gated through isOnlineStore(), so disabling also skips the serving pod, metrics, and service monitor. The default is unchanged -- omitting the online store block still deploys it with defaults -- so this is not a breaking change on upgrade. Signed-off-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>
| Back | FazBrowse Home | New Git URL |
Closes #6586.
Problem
The Feast operator always deployed an online store service (including a serving pod), even when the FeatureStore CR did not declare spec.services.onlineStore. This makes it impossible to run a standalone registry or offline store (e.g. the documented federated / shared-registry pattern), and is inconsistent with how registry and offlineStore behave — both are only defaulted when declared.
Cause
In ApplyDefaultsToStatus (infra/feast-operator/internal/controller/services/util.go), the online-store block force-created the service when nil:
whereas registry and offlineStore are gated behind if services.X != nil.
Fix
Gate the online-store defaulting behind services.OnlineStore != nil, mirroring the two sibling services. A declared online store still receives all of its defaults (persistence, path, PVC, server, container configs).
Tests
Added util_test.go with two specs for ApplyDefaultsToStatus:
Verified with KUBEBUILDER_ASSETS=... go test ./internal/controller/services/ (envtest 1.31.0); go build ./..., go vet, and gofmt are clean. The existing controller tests are unaffected because they declare onlineStore explicitly.