junyeong0619 commented on code in PR #66022:
URL: https://github.com/apache/airflow/pull/66022#discussion_r3215496758
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -277,6 +277,17 @@ def _get_variable(key: str, deserialize_json: bool) -> Any:
)
+def _get_variable_keys(prefix: str | None = None) -> list[str]:
+ from airflow.sdk.execution_time.comms import GetVariableKeys,
VariableKeysResult
+ from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS
+
+ msg = SUPERVISOR_COMMS.send(GetVariableKeys(prefix=prefix))
+ if not isinstance(msg, VariableKeysResult):
+ return []
Review Comment:
I have updated the implementation to follow the logic used in
`_get_variable` — propagating `ErrorResponse` as `AirflowRuntimeError` and
raising `TypeError` for unexpected response types.
--
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]