amoghrajesh commented on code in PR #67902:
URL: https://github.com/apache/airflow/pull/67902#discussion_r3354838619
##########
airflow-core/tests/unit/state/test_metastore.py:
##########
@@ -429,6 +429,45 @@ def test_different_assets_are_isolated(
assert backend.get(scope2, "watermark", session=session) is None
+ def test_set_asset_store_writes_ti_id(
+ self, backend: MetastoreStoreBackend, asset_committed: AssetModel,
create_task_instance
+ ):
+ ti = create_task_instance()
+ scope = AssetScope(asset_id=asset_committed.id)
+ backend.set_asset_store(scope, "watermark", "v", ti_id=ti.id)
+
+ with create_session() as s:
+ row =
s.scalar(select(AssetStoreModel).where(AssetStoreModel.asset_id ==
asset_committed.id))
+ assert row is not None
+ assert row.last_updated_by_ti_id == ti.id
+
+ @pytest.mark.backend("postgres", "mysql", "sqlite")
+ def test_set_asset_store_upsert_updates_ti_id(
+ self, backend: MetastoreStoreBackend, asset_committed: AssetModel,
create_task_instance
+ ):
+ ti1 = create_task_instance(task_id="task1")
+ ti2 = create_task_instance(task_id="task2")
Review Comment:
Fixed now
--
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]