Re: [PR] fix: Potential attributeError in split() on connection.host and test it [airflow]
github-actions[bot] closed pull request #58300: fix: Potential attributeError in split() on connection.host and test it URL: https://github.com/apache/airflow/pull/58300 -- 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]
Re: [PR] fix: Potential attributeError in split() on connection.host and test it [airflow]
github-actions[bot] commented on PR #58300: URL: https://github.com/apache/airflow/pull/58300#issuecomment-3712558974 This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. -- 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]
Re: [PR] fix: Potential attributeError in split() on connection.host and test it [airflow]
amoghrajesh commented on code in PR #58300:
URL: https://github.com/apache/airflow/pull/58300#discussion_r2529931237
##
providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:
##
@@ -574,7 +574,15 @@ def _get_openlineage_redshift_authority_part(self,
connection) -> str:
aws_conn_id = connection.extra_dejson.get("aws_conn_id", "aws_default")
port = connection.port or 5439
-cluster_identifier = connection.extra_dejson.get("cluster-identifier",
connection.host.split(".")[0])
+cluster_identifier = connection.extra_dejson.get("cluster-identifier")
+if cluster_identifier is None and not connection.host:
+raise ValueError(
+"connection.host is required for Redshift OpenLineage
authority "
+"when cluster-identifier is not provided in connection extra"
+)
Review Comment:
```suggestion
if cluster_identifier is None and not connection.host:
raise ValueError(
"connection host is required for Redshift OpenLineage when
cluster-identifier is not set in extras."
)
```
--
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]
