Repository navigation
Conversation
DataSource.to_proto() stores a ConnectionRef as feast.connection-ref.* entries in the proto tags. from_proto() rebuilt connection_ref from those entries but also left them in DataSource.tags, so a source with a connection_ref no longer compared equal to itself after a registry round trip, and clearing or replacing connection_ref on a loaded source had no effect because the stale tags were written back on the next to_proto(). One visible effect: pinning a feature view whose source has a connection_ref (version="v0") raised FeatureViewPinConflict even when the definition was unchanged. Signed-off-by: JanakiRamChittineni <341781521+raams95@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
DataSource.to_proto()writes aconnection_refinto the proto tags asfeast.connection-ref.*entries.DataSource.from_proto()rebuildsconnection_reffrom those entries, but it also leaves them inDataSource.tags. That causes two problems:A source with a
connection_refno longer equals itself after a registry round trip, becausetagsnow has the extra keys.This shows up when pinning a feature view version. If the feature view's source has a
connection_ref, applying it withversion="v0"and no other change raisesFeatureViewPinConflict, becauseapply_feature_viewcompares the user's view with the stored one and the batch sources differ only in those tags.Changing
connection_refon a loaded source doesn't stick. The old entries are still intags, so the nextto_proto()writes them back. Settingconnection_ref = Nonebrings the old reference back on the next load. Replacing it with a newConnectionRefkeeps the oldparams.The fix drops the
feast.connection-ref.*keys fromtagsinDataSource.from_proto(), right afterconnection_refis rebuilt from them. Everything else stays as it is. The proto still carries the tags, so stored registries and the proto diff infeast planare unchanged.Which issue(s) this PR fixes:
No existing issue. I found this while reading the
ConnectionRefcode and can open one if you'd like.Checks
git commit -s)Testing Strategy
Added two tests to
sdk/python/tests/unit/test_data_sources.py. One checks that a round trip keepstagsandconnection_refand that the source still equals the original. The other checks that clearing or replacingconnection_refon a loaded source survives another round trip. Both fail on master and pass with this change. I also rantest_credentials.py,test_feature_views.py,test_feature_view_versioning.py,test_stream_feature_view.py,test_unit_feature_store.py,local_feast_tests,infra/registry,infra/data_sources,infra/offline_storesand the iceberg_catalog tests. They show the same results with and without the change. The only failures in either run come from optional dependencies I don't have installed locally (pyspark) or from tests that need network access.ruff check,ruff format --checkandmypypass on the changed files.Misc