feat: Add upstream FeatureView lineage support for PushSource by mao-liu · Pull Request #6853 · feast-dev/feast
Repository navigation
feat: Add upstream FeatureView lineage support for PushSource - #6853
Merged
haoxu0 merged 4 commits into feast-dev:master from mao-liu:feat/push-source-lineage Oct 16, 2026
Merged
feat: Add upstream FeatureView lineage support for PushSource #6853 haoxu0 merged 4 commits into feast-dev:master from mao-liu:feat/push-source-lineage
Conversation
mao-liu commented Sep 20, 2026 · edited Loading
Copy link Copy Markdown
Contributor
What this PR does / why we need it:
In production ML architectures, derived features are often pre-computed by external stream or batch computation engines (e.g., Spark, Flink) that read from existing upstream Feast FeatureViews and push the transformed features into Feast via a PushSource.
Previously, Feast's static registry lineage only tracked:
PushSource --> Target FeatureView
Because PushSource had no way to declare upstream FeatureView dependencies, the connection between the upstream feature views and the push pipeline was lost in both registry lineage metadata and the Feast Web UI graph.
This PR adds first-class support for declaring upstream FeatureView dependencies on PushSource.
Summary of Changes:
- Protobuf (
protos/feast/core/DataSource.proto):- Added
repeated string upstream_feature_views = 2;toPushOptions. - Recompiled generated Python protobuf definitions.
- See note below on protobuf regeneration
- Added
- Python SDK (
sdk/python/feast/data_source.py):- Updated
PushSourceconstructor to acceptsource_views: Optional[Sequence[Union[BaseFeatureView, str]]]. - Updated
to_proto(),from_proto(), and__eq__()serialization and comparison logic.
- Updated
- Registry Lineage Engine (
sdk/python/feast/lineage/registry_lineage.py):- Emits
EntityRelationedges for upstreamFeatureView/LabelView->DataSource (PushSource). - Ensures
streamSource->FeatureViewdirect relationships are consistently registered for stream/push sources. - See note below on stream source rendering
- Emits
- UI Lineage Parser & Graph (
ui/):- Updated
parseEntityRelationships.tsto parseupstreamFeatureViewsondataSourcesand draw visual edges. - Updated
RegistryVisualization.tsxto include stream sources and standalone data sources in the visual DAG.
- Updated
- OpenLineage event emission is deliberately not implemented
- Granular relationships between data sources and feature views are not currently rendered in OpenLineage
- See also: Granular OpenLineage event emission on
feast applyfor precise FeatureView lineage #6852
Protobuf regeneration notes
To avoid mass regeneration of proto files leading to a huge diff, the protos were
generated by pinning generator tools to a version matching the older tools
used when generating the existing files.
uv run \
--with "grpcio-tools==1.62.2" \
--with "protobuf==4.25.1" \
--with "mypy-protobuf==3.3.0" \
python infra/scripts/generate_protos.py
A prior commit on master (28bde01 which introduced ConnectionRef) updated DataSource.proto but did not commit the generated DataSource_pb2.py / .pyi bindings. Compiling DataSource.proto now brought in both upstream_feature_views and ConnectionRef.
Rendering of stream sources in Feast Lineage
Previously, there was an inconsistency between FeatureView and StreamFeatureView:
- StreamFeatureView: Always drew edges for both its streamSource and its batchSource:
- streamSource -> StreamFeatureView
- batchSource -> StreamFeatureView
- Standard FeatureView: Only inspected fv.spec.batchSource:
- If a standard FeatureView used a PushSource, KafkaSource, or KinesisSource, Feast populated both stream_source and batch_source under the hood.
- However, the lineage generator (both in Python registry_lineage.py and in UI parseEntityRelationships.ts) completely ignored fv.spec.streamSource.
- Consequently, the stream/push source node was omitted, and only the batch source was connected.
Now, whenever a standard FeatureView has a streamSource defined (PushSource, KafkaSource, KinesisSource, etc.), the relationship streamSource -> FeatureView is always drawn. Specific unit tests in both Python (test_registry_lineage.py) and UI (RegistryVisualization.test.tsx) assert this behavior across PushSource, KafkaSource, and KinesisSource.
Which issue(s) this PR fixes:
Fixes #6839
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
Manual PoC Testing:
- Tested end-to-end with a sample feature definition containing upstream feature views, a push source with
source_views, and a downstream feature view.
Before:
After:
PoC testing configurationfeature-store.yaml
project: push_source_poc
registry: data/registry.db
provider: local
offline_store:
type: file
online_store:
type: sqlite
path: data/online_store.db
entity_key_serialization_version: 3
definitions.py
from datetime import timedelta
import pandas as pd
from feast import (
BatchFeatureView,
Entity,
FeatureService,
FeatureView,
Field,
FileSource,
KafkaSource,
KinesisSource,
PushSource,
StreamFeatureView,
)
from feast.data_format import JsonFormat
from feast.on_demand_feature_view import on_demand_feature_view
from feast.types import Float32, Int64
from feast.value_type import ValueType
# ---------------------------------------------------------------------------
# 1. Entity
# ---------------------------------------------------------------------------
user = Entity(
name="user_id",
join_keys=["user_id"],
value_type=ValueType.INT64,
description="Unique identifier for users",
)
# ---------------------------------------------------------------------------
# 2. Batch Data Sources (FileSource)
# ---------------------------------------------------------------------------
user_tx_batch_source = FileSource(
name="user_tx_batch_source",
path="data/transactions.parquet",
timestamp_field="event_timestamp",
created_timestamp_column="created",
)
user_credit_batch_source = FileSource(
name="user_credit_batch_source",
path="data/credit_profile.parquet",
timestamp_field="event_timestamp",
created_timestamp_column="created",
)
user_raw_push_batch_source = FileSource(
name="user_raw_push_batch_source",
path="data/raw_push.parquet",
timestamp_field="event_timestamp",
created_timestamp_column="created",
)
risk_calc_batch_source = FileSource(
name="risk_calc_batch_source",
path="data/risk_offline.parquet",
timestamp_field="event_timestamp",
created_timestamp_column="created",
)
# ---------------------------------------------------------------------------
# 3. Upstream Feature Views
# ---------------------------------------------------------------------------
user_transaction_stats = FeatureView(
name="user_transaction_stats",
entities=[user],
ttl=timedelta(days=30),
schema=[Field(name="tx_amount", dtype=Float32)],
source=user_tx_batch_source,
description="User transaction statistics",
)
user_credit_profile = FeatureView(
name="user_credit_profile",
entities=[user],
ttl=timedelta(days=30),
schema=[Field(name="credit_score", dtype=Int64)],
source=user_credit_batch_source,
description="User credit profile history",
)
# ---------------------------------------------------------------------------
# 4. Push & Stream Data Sources
# ---------------------------------------------------------------------------
# PushSource with upstream FeatureView dependencies
risk_calc_pipeline = PushSource(
name="risk_calc_pipeline",
batch_source=risk_calc_batch_source,
source_views=[user_transaction_stats, user_credit_profile],
description="Spark/Flink streaming pipeline reading tx stats and credit profile",
)
# PushSource without upstream FeatureView dependencies
raw_push_source = PushSource(
name="raw_push_source",
batch_source=user_raw_push_batch_source,
description="Direct push source without upstream views",
)
# ---------------------------------------------------------------------------
# 5. Downstream & Target Feature Views
# ---------------------------------------------------------------------------
# Target FeatureView fed by PushSource with upstream lineage
user_risk_target_fv = FeatureView(
name="user_risk_target_fv",
entities=[user],
ttl=timedelta(days=30),
schema=[
Field(name="composite_risk_score", dtype=Float32),
Field(name="risk_tier", dtype=Int64),
],
source=risk_calc_pipeline,
description="User risk scores computed by external pipeline and pushed",
)
# FeatureView fed by PushSource without upstream dependencies
user_raw_push_fv = FeatureView(
name="user_raw_push_fv",
entities=[user],
ttl=timedelta(days=30),
schema=[Field(name="push_val", dtype=Float32)],
source=raw_push_source,
description="Raw push feature view",
)
mao-liu
requested a review
from a team
as a code owner
September 20, 2026 23:17
feat: implementing registry lineage for PushSource
c1087c9
Signed-off-by: Mao Liu <1684060+mao-liu@users.noreply.github.com>mao-liu force-pushed the feat/push-source-lineage branch from
e1bcf84 to
c1087c9
Compare
September 20, 2026 23:19
Merge branch 'master' into feat/push-source-lineage
e3566a3
mao-liu
mentioned this pull request
Sep 20, 2026
Add upstream FeatureView lineage support for PushSource
#6839
Closed
codecov-commenter commented Sep 21, 2026 · edited Loading
Copy link Copy Markdown
|
⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov. Codecov Report❌ Patch coverage is
@@ Coverage Diff @@ ## master #6853 +/- ## ========================================== + Coverage 50.94% 50.98% +0.04% ========================================== Files 455 455 Lines 56915 56964 +49 Branches 8290 8313 +23 ========================================== + Hits 28994 29045 +51 + Misses 25940 25935 -5 - Partials 1981 1984 +3
Continue to review full report in Codecov by Harness . 🚀 New features to boost your workflow:
|
haoxu0 commented Sep 21, 2026 · edited Loading
Copy link Copy Markdown
Collaborator
|
Could you clarify why this needs a second I understand that the intended distinction may be that this PR describes an externally managed Spark/Flink pipeline and therefore treats the dependency as lineage-only metadata. However, the current API leaves two ways to express essentially the same upstream relationship:
Those representations can disagree, and the shared |
mao-liu commented Sep 21, 2026
Copy link Copy Markdown
Contributor
Author
Thanks for the review @haoxu0 - I was not aware of My understanding is that
It will be challenging to try to use
Regarding when
I have pushed a couple of changes, would appreciate another review and any further feedback!
Thanks! |
rename source_views to upstream_feature_view_names, add docs and vali...
53d9d28
...dation Signed-off-by: Mao Liu <1684060+mao-liu@users.noreply.github.com>mao-liu force-pushed the feat/push-source-lineage branch from
15a191d to
53d9d28
Compare
September 21, 2026 23:58 nabinkim0318 mentioned this pull request Sep 22, 2026 Granular OpenLineage event emission on
feast apply for precise FeatureView lineage
#6852
Open
haoxu0 commented Oct 8, 2026
Copy link Copy Markdown
Collaborator
I think that makes sense. do you mind resolve the conflicts so we can try to merge it? :thanks! |
Merge remote-tracking branch 'origin/master' into feat/push-source-li...
fa7406b
...neage
mao-liu commented Oct 16, 2026
Copy link Copy Markdown
Contributor
Author
Thank you @haoxu0 , apologies I did not see this notification and missed your reply. This is fixed now, please let me know if there's anything else needed on this PR, thanks! |
c9b9d72
into
feast-dev : master
Oct 16, 2026
26 checks passed
haoxu0 commented Oct 16, 2026
Copy link Copy Markdown
Collaborator
|
merged. @mao-liu thanks for your contribution! |
chore(release): release 0.68.0
fb5e5d5
# [0.68.0](v0.67.0...v0.68.0) (2026-11-10) ### Bug Fixes * add watch verb on clusterroles and clusterrolebindings for feast-operator ([#7062](#7062)) ([b6bdda4](b6bdda4)) * Apply on demand feature views in SparkRetrievalJob.to_spark_df() ([#6993](#6993)) ([f416309](f416309)) * Break event timestamp ties by created timestamp in Milvus write batches ([#7084](#7084)) ([bbaca76](bbaca76)) * Break event timestamp ties by created timestamp in the Dask offline store ([#6952](#6952)) ([eb93b08](eb93b08)) * Build the Go feature server image in two stages ([1e5e90c](1e5e90c)), closes [#7060](#7060) * Fall back to the serialized body when UDF source misses globals ([#6816](#6816)) ([f61079f](f61079f)) * Install patched libbrotli1 to address DSA-6582-1 ([#7096](#7096)) ([d458393](d458393)) * Keep description, tags and nested types of ODFV schema fields ([8ef6e75](8ef6e75)) * Keep entity columns out of StreamFeatureView proto features ([#7033](#7033)) ([d520584](d520584)) * Keep the metrics server running when a Gunicorn worker exits ([#7012](#7012)) ([68c5d54](68c5d54)), closes [#7011](#7011) * Key registry proto caches on the proto, not its id() ([#7085](#7085)) ([147adad](147adad)) * Log ODFV materialization skips instead of printing them ([#7117](#7117)) ([8fdcee7](8fdcee7)) * Pin build dependencies of source builds to the CI lock ([#7104](#7104)) ([dec2f24](dec2f24)) * Populate spec.project in registry REST feature view responses (#... ([#7037](#7037)) ([e304a84](e304a84)) * Preserve colliding source timestamps in Dask retrieval ([#7071](#7071)) ([1396c88](1396c88)) * Preserve Dask historical requests without eligible features ([#7000](#7000)) ([fff09f7](fff09f7)) * Read None elements of UUID and Decimal lists as None ([#7039](#7039)) ([03f30fe](03f30fe)) * Retire the support of Python3.10 ([#7101](#7101)) ([a56766e](a56766e)), closes [#7104](#7104) [#7089](#7089) [#7106](#7106) [#7105](#7105) * Serialize UUID and TimeUuid entity keys ([#7032](#7032)) ([0c845a1](0c845a1)) * Stop the Ray engine from hiding materialization errors ([#7026](#7026)) ([7903e2e](7903e2e)), closes [#7024](#7024) * **ui:** stop treating the monitoring baseline as the latest window ([#7056](#7056)) ([0f01802](0f01802)), closes [#7054](#7054) * Use date-only bounds for partition filters built from string timestamps ([#7116](#7116)) ([b1f2168](b1f2168)) * Validate entity column types in feast dbt import ([#7067](#7067)) ([abca80c](abca80c)), closes [#5876](#5876) * Warm up the whole DynamoDB connection pool ([#6985](#6985)) ([8ce548c](8ce548c)) ### Features * Add --gc-freeze option to feast serve ([#7089](#7089)) ([aad0c15](aad0c15)) * Add native complex types and scalar index tags to the Milvus online store ([#7120](#7120)) ([f7068d6](f7068d6)) * Add num_partitions and partition_key_isolation to the Milvus online store ([#7083](#7083)) ([68de84e](68de84e)), closes [#6940](#6940) * Add Pinecone online store integration ([#6585](#6585)) ([7a84f2a](7a84f2a)) * Add PolarisSource and PolarisProvider for Apache Polaris ([#7006](#7006)) ([386759c](386759c)) * Add row deletion to the Milvus online store ([#7082](#7082)) ([d3e2041](d3e2041)) * Add upstream FeatureView lineage support for PushSource ([#6853](#6853)) ([c9b9d72](c9b9d72)) * Optional nameless pre-computed vectors with a schema fingerprint ([#7077](#7077)) ([9420fac](9420fac)) ### Performance Improvements * Scan Lance sources lazily in the DuckDB offline store ([1299e4e](1299e4e))patelchaitany mentioned this pull request Nov 11, 2026 chore: Sync upstream feast-dev/feast stable (0.68.0) opendatahub-io/feast#291 Merged shuchu pushed a commit to shuchu/feast that referenced this pull request Nov 11, 2026
chore(release): release 0.68.0
5b94c9e
# [0.68.0](feast-dev/feast@v0.67.0...v0.68.0) (2026-11-10) ### Bug Fixes * add watch verb on clusterroles and clusterrolebindings for feast-operator ([feast-dev#7062](feast-dev#7062)) ([b6bdda4](feast-dev@b6bdda4)) * Apply on demand feature views in SparkRetrievalJob.to_spark_df() ([feast-dev#6993](feast-dev#6993)) ([f416309](feast-dev@f416309)) * Break event timestamp ties by created timestamp in Milvus write batches ([feast-dev#7084](feast-dev#7084)) ([bbaca76](feast-dev@bbaca76)) * Break event timestamp ties by created timestamp in the Dask offline store ([feast-dev#6952](feast-dev#6952)) ([eb93b08](feast-dev@eb93b08)) * Build the Go feature server image in two stages ([1e5e90c](feast-dev@1e5e90c)), closes [feast-dev#7060](feast-dev#7060) * Fall back to the serialized body when UDF source misses globals ([feast-dev#6816](feast-dev#6816)) ([f61079f](feast-dev@f61079f)) * Install patched libbrotli1 to address DSA-6582-1 ([feast-dev#7096](feast-dev#7096)) ([d458393](feast-dev@d458393)) * Keep description, tags and nested types of ODFV schema fields ([8ef6e75](feast-dev@8ef6e75)) * Keep entity columns out of StreamFeatureView proto features ([feast-dev#7033](feast-dev#7033)) ([d520584](feast-dev@d520584)) * Keep the metrics server running when a Gunicorn worker exits ([feast-dev#7012](feast-dev#7012)) ([68c5d54](feast-dev@68c5d54)), closes [feast-dev#7011](feast-dev#7011) * Key registry proto caches on the proto, not its id() ([feast-dev#7085](feast-dev#7085)) ([147adad](feast-dev@147adad)) * Log ODFV materialization skips instead of printing them ([feast-dev#7117](feast-dev#7117)) ([8fdcee7](feast-dev@8fdcee7)) * Pin build dependencies of source builds to the CI lock ([feast-dev#7104](feast-dev#7104)) ([dec2f24](feast-dev@dec2f24)) * Populate spec.project in registry REST feature view responses (#... ([feast-dev#7037](feast-dev#7037)) ([e304a84](feast-dev@e304a84)) * Preserve colliding source timestamps in Dask retrieval ([feast-dev#7071](feast-dev#7071)) ([1396c88](feast-dev@1396c88)) * Preserve Dask historical requests without eligible features ([feast-dev#7000](feast-dev#7000)) ([fff09f7](feast-dev@fff09f7)) * Read None elements of UUID and Decimal lists as None ([feast-dev#7039](feast-dev#7039)) ([03f30fe](feast-dev@03f30fe)) * Retire the support of Python3.10 ([feast-dev#7101](feast-dev#7101)) ([a56766e](feast-dev@a56766e)), closes [feast-dev#7104](feast-dev#7104) [feast-dev#7089](feast-dev#7089) [feast-dev#7106](feast-dev#7106) [feast-dev#7105](feast-dev#7105) * Serialize UUID and TimeUuid entity keys ([feast-dev#7032](feast-dev#7032)) ([0c845a1](feast-dev@0c845a1)) * Stop the Ray engine from hiding materialization errors ([feast-dev#7026](feast-dev#7026)) ([7903e2e](feast-dev@7903e2e)), closes [feast-dev#7024](feast-dev#7024) * **ui:** stop treating the monitoring baseline as the latest window ([feast-dev#7056](feast-dev#7056)) ([0f01802](feast-dev@0f01802)), closes [feast-dev#7054](feast-dev#7054) * Use date-only bounds for partition filters built from string timestamps ([feast-dev#7116](feast-dev#7116)) ([b1f2168](feast-dev@b1f2168)) * Validate entity column types in feast dbt import ([feast-dev#7067](feast-dev#7067)) ([abca80c](feast-dev@abca80c)), closes [feast-dev#5876](feast-dev#5876) * Warm up the whole DynamoDB connection pool ([feast-dev#6985](feast-dev#6985)) ([8ce548c](feast-dev@8ce548c)) ### Features * Add --gc-freeze option to feast serve ([feast-dev#7089](feast-dev#7089)) ([aad0c15](feast-dev@aad0c15)) * Add native complex types and scalar index tags to the Milvus online store ([feast-dev#7120](feast-dev#7120)) ([f7068d6](feast-dev@f7068d6)) * Add num_partitions and partition_key_isolation to the Milvus online store ([feast-dev#7083](feast-dev#7083)) ([68de84e](feast-dev@68de84e)), closes [feast-dev#6940](feast-dev#6940) * Add Pinecone online store integration ([feast-dev#6585](feast-dev#6585)) ([7a84f2a](feast-dev@7a84f2a)) * Add PolarisSource and PolarisProvider for Apache Polaris ([feast-dev#7006](feast-dev#7006)) ([386759c](feast-dev@386759c)) * Add row deletion to the Milvus online store ([feast-dev#7082](feast-dev#7082)) ([d3e2041](feast-dev@d3e2041)) * Add upstream FeatureView lineage support for PushSource ([feast-dev#6853](feast-dev#6853)) ([c9b9d72](feast-dev@c9b9d72)) * Optional nameless pre-computed vectors with a schema fingerprint ([feast-dev#7077](feast-dev#7077)) ([9420fac](feast-dev@9420fac)) ### Performance Improvements * Scan Lance sources lazily in the DuckDB offline store ([1299e4e](feast-dev@1299e4e)) Signed-off-by: Shuchu Han <shuchu.han@gmail.com>rhods-devops-app
Bot
mentioned this pull request Nov 12, 2026 Automated Sync from main to stable red-hat-data-services/feast#630 Merged Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment