jscheffl commented on code in PR #45958:
URL: https://github.com/apache/airflow/pull/45958#discussion_r1937982373
##########
providers/edge/src/airflow/providers/edge/cli/api_client.py:
##########
@@ -103,15 +104,16 @@ def worker_register(
def worker_set_state(
hostname: str, state: EdgeWorkerState, jobs_active: int, queues: list[str]
| None, sysinfo: dict
-) -> list[str] | None:
+) -> WorkerSetStateReturn:
"""Update the state of the worker in the central site and thereby
implicitly heartbeat."""
- return _make_generic_request(
+ result = _make_generic_request(
"PATCH",
f"worker/{quote(hostname)}",
WorkerStateBody(state=state, jobs_active=jobs_active, queues=queues,
sysinfo=sysinfo).model_dump_json(
exclude_unset=True
),
)
+ return WorkerSetStateReturn(**result["__data__"])
Review Comment:
It seems the v2 wrapper "wrongly" serializes the class, therefore this
compatibility breaks the EdgeWorker in Airflow 3.
```suggestion
return WorkerSetStateReturn(**result)
```
--
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]