Lee-W commented on code in PR #68274:
URL: https://github.com/apache/airflow/pull/68274#discussion_r3380719173
##########
airflow-core/docs/administration-and-deployment/task-and-asset-store.rst:
##########
@@ -178,26 +178,27 @@ Example skeleton:
class S3StateBackend(BaseStoreBackend):
- def _task_ref(self, ti_id: str, key: str) -> str:
- return f"airflow/task-store/{ti_id}/{key}"
+ def _task_ref(self, scope: TaskScope, key: str) -> str:
+ return
f"airflow/task-store/{scope.dag_id}/{scope.run_id}/{scope.task_id}/{scope.map_index}/{key}"
- def _asset_ref(self, asset_ref: str, key: str) -> str:
+ def _asset_ref(self, scope: AssetScope, key: str) -> str:
import hashlib
+ asset_ref = scope.name or scope.uri or ""
Review Comment:
This is still not really an asset_ref 🤔
`Asset.ref(name=...)` or `Asset.ref(uri=...)` is an `AssetRef`. wondering
whether we have a better way to avoid the naming issue. but yep, naming is
hard...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]