kaxil commented on code in PR #67833:
URL: https://github.com/apache/airflow/pull/67833#discussion_r3336965314
##########
task-sdk/tests/task_sdk/api/test_client.py:
##########
@@ -1808,21 +1808,21 @@ def handle_request(request: httpx.Request) ->
httpx.Response:
)
client = make_client(transport=httpx.MockTransport(handle_request))
- result = client.task_state.get(ti_id=self.TI_ID, key="job_id")
+ result = client.task_store.get(ti_id=self.TI_ID, key="job_id")
assert isinstance(result, ErrorResponse)
- assert result.error == ErrorType.TASK_STATE_NOT_FOUND
+ assert result.error == ErrorType.task_store_NOT_FOUND
Review Comment:
The rename lowercased the middle of these enum references:
`ErrorType.task_store_NOT_FOUND` here and `ErrorType.asset_store_NOT_FOUND` at
line 1937. `ErrorType` only defines `TASK_STORE_NOT_FOUND` /
`ASSET_STORE_NOT_FOUND` (uppercase, `exceptions.py:94-95`), so both lines raise
`AttributeError` and these two not-found-path tests error out. Looks like the
find-replace swapped `STATE` -> `store` mid-token but kept the surrounding
case. Should be `ErrorType.TASK_STORE_NOT_FOUND` and
`ErrorType.ASSET_STORE_NOT_FOUND`.
##########
airflow-core/src/airflow/example_dags/example_task_state.py:
##########
@@ -50,27 +50,27 @@ def _poll_job(job_id: str) -> dict:
with DAG(
- dag_id="example_task_state",
+ dag_id="example_task_store",
Review Comment:
The contents here (and in `example_asset_state.py`) are renamed to
`*_store`, but the filenames still say `*_state`. The rename table in the PR
description lists `example_task_state`/`example_asset_state` ->
`example_task_store`/`example_asset_store`, so these look like a missed `git
mv`. Same mismatch in the two model test files
(`tests/unit/models/test_task_state.py`, `test_asset_state.py`), which also
keep stale class names (`TestTaskStateModel` / `TestAssetStateModel` testing
`*StoreModel`).
--
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]