Skip to content

Add hybrid to ValidOfflineStoreDBStorePersistenceTypes for HybridOfflineStore support #6701

Description

@ntkathole

Summary

The Feast SDK supports HybridOfflineStore which routes offline operations to different backends based on the batch_source type of each FeatureView. However, the Feast Operator's FeatureStore CRD does not include hybrid in ValidOfflineStoreDBStorePersistenceTypes, blocking users from configuring it via the CR.

The online store already has hybrid in its valid types (ValidOnlineStoreDBStorePersistenceTypes) — added in commit 678589b via #5810. The same one-line addition is needed for the offline store.

Problem

The CRD enum for offline store persistence types does not include hybrid:

// infra/feast-operator/api/v1/featurestore_types.go
// +kubebuilder:validation:Enum=snowflake.offline;bigquery;redshift;spark;postgres;trino;athena;mssql;couchbase.offline;clickhouse;ray
Type string `json:"type"`

Users who set type: hybrid in their CR get a validation error. This prevents using the existing secret pass-through mechanism to configure HybridOfflineStore — even though the SDK and server fully support it.

Proposed Fix

Add hybrid to the offline store enum (same pattern as the online store fix in #5810):

// +kubebuilder:validation:Enum=snowflake.offline;bigquery;redshift;spark;postgres;trino;athena;mssql;couchbase.offline;clickhouse;ray;hybrid
Type string `json:"type"`

var ValidOfflineStoreDBStorePersistenceTypes = []string{
    "snowflake.offline",
    "bigquery",
    "redshift",
    "spark",
    "postgres",
    "trino",
    "athena",
    "mssql",
    "couchbase.offline",
    "clickhouse",
    "ray",
    "hybrid",  // <-- add this
}

This needs to be applied to both api/v1/ and api/v1alpha1/ versions, plus CRD regeneration.

How It Works (no other operator changes needed)

The operator's existing secret pass-through mechanism handles the full hybrid config:

# CR
spec:
  services:
    offlineStore:
      persistence:
        store:
          type: hybrid
          secretRef: { name: hybrid-offline-config }
# Secret "hybrid-offline-config", key "hybrid"
offline_stores:
  - type: snowflake.offline
    conf:
      account: xy12345.us-east-1
      user: feast_user
      password: ${SNOWFLAKE_PASSWORD}
      database: ANALYTICS
      warehouse: COMPUTE_WH
  - type: bigquery
    conf:
      project_id: analytics-prod
      dataset: features

The operator merges type: hybrid + secret value into the generated feature_store.yaml with HybridOfflineStoreConfig. No additional structured fields or operator logic changes are required.

Metadata

Metadata

Labels

OperatorFeast operator related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions