@@ -464,7 +464,7 @@ def safe_get_commit_sha(metadata_dict: Union[dict, BaseModel]) -> Optional[str]:
464
464
auto_materialize_policy = AutoMaterializePolicy .eager (max_materializations_per_minute = MAX_METADATA_PARTITION_RUN_REQUEST ),
465
465
)
466
466
@sentry .instrument_asset_op
467
- def metadata_entry (context : OpExecutionContext , airbyte_slack_users : pd . DataFrame ) -> Output [Optional [LatestMetadataEntry ]]:
467
+ def metadata_entry (context : OpExecutionContext ) -> Output [Optional [LatestMetadataEntry ]]:
468
468
"""Parse and compute the LatestMetadataEntry for the given metadata file."""
469
469
etag = context .partition_key
470
470
context .log .info (f"Processing metadata file with etag { etag } " )
@@ -475,6 +475,8 @@ def metadata_entry(context: OpExecutionContext, airbyte_slack_users: pd.DataFram
475
475
if not matching_blob :
476
476
raise Exception (f"Could not find blob with etag { etag } " )
477
477
478
+ airbyte_slack_users = HACKS .get_airbyte_slack_users_from_graph (context )
479
+
478
480
metadata_dict = yaml_blob_to_dict (matching_blob )
479
481
user_identifier = safe_get_slack_user_identifier (airbyte_slack_users , metadata_dict )
480
482
commit_sha = safe_get_commit_sha (metadata_dict )
@@ -548,16 +550,16 @@ def metadata_entry(context: OpExecutionContext, airbyte_slack_users: pd.DataFram
548
550
auto_materialize_policy = AutoMaterializePolicy .eager (max_materializations_per_minute = MAX_METADATA_PARTITION_RUN_REQUEST ),
549
551
)
550
552
@sentry .instrument_asset_op
551
- def registry_entry (
552
- context : OpExecutionContext , metadata_entry : Optional [LatestMetadataEntry ], airbyte_slack_users : pd .DataFrame
553
- ) -> Output [Optional [dict ]]:
553
+ def registry_entry (context : OpExecutionContext , metadata_entry : Optional [LatestMetadataEntry ]) -> Output [Optional [dict ]]:
554
554
"""
555
555
Generate the registry entry files from the given metadata file, and persist it to GCS.
556
556
"""
557
557
if not metadata_entry :
558
558
# if the metadata entry is invalid, return an empty dict
559
559
return Output (metadata = {"empty_metadata" : True }, value = None )
560
560
561
+ airbyte_slack_users = HACKS .get_airbyte_slack_users_from_graph (context )
562
+
561
563
user_identifier = safe_get_slack_user_identifier (airbyte_slack_users , metadata_entry .metadata_definition )
562
564
commit_sha = safe_get_commit_sha (metadata_entry .metadata_definition )
563
565
0 commit comments