Skip to content

feat: Add feast apply init container to automate registry population on pod start#6106

Merged
ntkathole merged 4 commits intofeast-dev:masterfrom
ntkathole:applyondeploy
Mar 15, 2026
Merged

feat: Add feast apply init container to automate registry population on pod start#6106
ntkathole merged 4 commits intofeast-dev:masterfrom
ntkathole:applyondeploy

Conversation

@ntkathole
Copy link
Member

@ntkathole ntkathole commented Mar 14, 2026

What this PR does / why we need it:

When deploying Feast via the Feast Operator, users must manually run feast apply
after every CRD creation to populate the feature store registry. This is an extra
operational step that is easy to forget and creates a poor user experience.

  • This PR adds a feast-apply init container to the Feast deployment that runs feast apply
    automatically before the main server containers start. This ensures the registry is
    always populated on every pod start. The init container inherits env vars, envFrom, and volume mounts from all configured server containers (registry, online, offline) to ensure DB/store connectivity.

Users can set spec.services.runFeastApplyOnInit to false to disable the automatic apply behavior. The feature can also be disabled globally via the existing spec.services.disableInitContainers: true field.

  • Surface container failure details in CRD status when the deployment is unavailable. Instead of the generic "Deployment is not available", the controller now inspects pod init/container statuses and reports the specific failure (e.g., Init container 'feast-apply' failed with exit code 1).

  • Fix _apply_object race condition in SqlRegistry by wrapping the insert in a savepoint and catching IntegrityError, so concurrent feast apply calls from multiple pods don't crash on duplicate key conflicts. This was done to fix intermittent failures on rest-api tests.

  • Make replicas field optional in the FeatureStore CRD spec (json:"replicas,omitempty"), removing it from the required list so it defaults to 1 without requiring explicit specification.


Open with Devin

@ntkathole ntkathole self-assigned this Mar 14, 2026
@ntkathole ntkathole requested a review from a team as a code owner March 14, 2026 10:30
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 10 additional findings in Devin Review.

Open in Devin Review

@ntkathole ntkathole merged commit 6b31a43 into feast-dev:master Mar 15, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants