anishgirianish commented on code in PR #62343:
URL: https://github.com/apache/airflow/pull/62343#discussion_r3316037103
##########
task-sdk/src/airflow/sdk/api/client.py:
##########
@@ -1047,6 +1051,28 @@ def get_detail_response(self, ti_id: uuid.UUID) ->
HITLDetailResponse:
return HITLDetailResponse.model_validate_json(resp.read())
+class ConnectionTestOperations:
+ __slots__ = ("client",)
+
+ def __init__(self, client: Client):
+ self.client = client
+
+ def get_connection(self, connection_test_id: uuid.UUID) ->
ConnectionTestConnectionResponse:
+ """Fetch connection data for a test request from the API server."""
+ resp =
self.client.get(f"connection-tests/{connection_test_id}/connection")
+ return
ConnectionTestConnectionResponse.model_validate_json(resp.read())
+
+ def update_state(
+ self, id: uuid.UUID, state: ConnectionTestState, result_message: str |
None = None
+ ) -> None:
+ """Report the state of a connection test to the API server."""
+ body = ConnectionTestResultBody(
+ state=state,
+ result_message=ResultMessage(result_message) if result_message is
not None else None,
Review Comment:
Done thanks
--
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]