Lee-W commented on code in PR #69780:
URL: https://github.com/apache/airflow/pull/69780#discussion_r3628798416
##########
shared/secrets_backend/src/airflow_shared/secrets_backend/base.py:
##########
@@ -122,6 +123,11 @@ def _get_connection_class(self) -> type:
def _deserialize_connection_value(conn_class: type, conn_id: str, value:
str):
value = value.strip()
if value[0] == "{":
+ connection_data = json.loads(value)
+ conn_type = connection_data.get("conn_type")
+ uri = connection_data.get("uri")
+ if not (isinstance(conn_type, str) and conn_type.strip() or
isinstance(uri, str) and uri.strip()):
+ raise ValueError("Connection secret JSON must include a
non-empty 'conn_type' or 'uri'.")
Review Comment:
Thanks for the clarification. I forgot we already had that PR. 🤦♂️
We could also add a comment or some documentation around the relevant
function so others don't end up trying the same thing again.
--
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]