Repository navigation
fix: Enforce required_tags and lineage RBAC, and store BatchFeatureView UDF changes #7191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
40d8ae9
5520aaf
68cab1d
3c16720
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -297,6 +297,7 @@ def get_full_lineage_graph( | |
| or matching dataSource URIs). | ||
| """ | ||
| ns_filter = _get_namespace_filter(get_allowed_namespaces) | ||
| allowed_namespaces = ns_filter | ||
| if namespace: | ||
| if ns_filter is not None and namespace not in ns_filter: | ||
| return {"nodes": [], "edges": [], "symlinks": []} | ||
|
|
@@ -360,6 +361,21 @@ def get_full_lineage_graph( | |
|
|
||
| edges = store.get_all_lineage_edges(namespaces=ns_filter) | ||
| symlinks = store.get_all_symlinks() | ||
| if allowed_namespaces is not None: | ||
| # A link is only shown when both of its ends are in namespaces the | ||
| # caller may see, so it cannot reveal another team's datasets. | ||
| allowed = set(allowed_namespaces) | ||
| edges = [ | ||
| e | ||
| for e in edges | ||
| if e["source_namespace"] in allowed and e["target_namespace"] in allowed | ||
| ] | ||
| symlinks = [ | ||
| sl | ||
| for sl in symlinks | ||
| if sl["dataset_namespace"] in allowed | ||
| and sl["linked_namespace"] in allowed | ||
| ] | ||
| for sl in symlinks: | ||
| edges.append( | ||
| { | ||
|
|
@@ -513,7 +529,8 @@ def _get_namespace_filter(ns_callable) -> Optional[List[str]]: | |
| try: | ||
| return ns_callable() | ||
| except Exception: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. returning |
||
| return None | ||
| # Fail closed: a broken RBAC check must not expose every namespace. | ||
| return [] | ||
| return None | ||
|
|
||
| return router | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Reapplied batch views crash during deserialization
Reapplying SQL or Flink batch views through
Registry.apply_feature_viewnow raisesAttributeError. Neither SQLTransformation nor FlinkTransformation implementsfrom_proto, and the dispatch only catchesValueErrorandKeyError. Even unchanged definitions cannot be reapplied.Learn more
The file registry calls the incoming view's concrete class to restore an existing definition before comparing changes in Registry.apply_feature_view. Previously, BatchFeatureView bypassed transformation reconstruction there. The expanded condition now dispatches restoration through the mode-specific class selected by get_transformation_class_from_type. SQLTransformation and FlinkTransformation have no
from_proto, including through their Transformation base. Calling that missing method raisesAttributeError, which escapes the existing exception handler; Spark wrappers have the same missing deserializer.Example: Apply a
BatchFeatureViewwith a FileSource, an explicit schema,mode="sql", and a SQL-producing UDF throughRegistry.apply_feature_view. Applying the identical definition again enters transformation restoration and raisesAttributeError: type object 'SQLTransformation' has no attribute 'from_proto'.Recommended fix: Provide mode-preserving deserialization for every supported transformation wrapper before routing BatchFeatureView restoration through this dispatch. Add round-trip and repeated-apply tests for SQL and Flink, and cover Spark when its dependencies are available. Simply swallowing
AttributeErroror discarding the transformation would leave the persisted definition incorrect.Was this helpful? React with 👍 or 👎 to provide feedback.