ferruzzi commented on code in PR #27823:
URL: https://github.com/apache/airflow/pull/27823#discussion_r1031868722
##########
airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -405,9 +411,68 @@ def __init__(
self.resource_type = resource_type
self._region_name = region_name
- self._config = config
+ self._config = config or botocore.config.Config()
self._verify = verify
+ @classmethod
+ def _get_provider_version(cls) -> str:
+ """Checks the Providers Manager for the package version."""
+ manager = ProvidersManager()
+ provider_name = manager.hooks[cls.conn_type].package_name # type:
ignore[union-attr]
Review Comment:
Sorry for the delay, just got back from vacation and it took a little longer
to get back into gear. I ended up wrapping it in a try/except as mentioned and
dropped the `if not hook`. If `hook` is falsy, then it'll error out on the
next line at `hook.package_name` anyway and get caught by the `except`.
Addressed in
https://github.com/apache/airflow/pull/27823/commits/a5fc3bc4a39855b9f3c7fc5ac26505709d191a98
--
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]