shahar1 commented on code in PR #44598:
URL: https://github.com/apache/airflow/pull/44598#discussion_r1868375654
##########
providers/src/airflow/providers/hashicorp/hooks/vault.py:
##########
@@ -148,22 +146,7 @@ def __init__(
client_kwargs = merge_dicts(client_kwargs, kwargs)
if auth_type == "approle":
- if role_id:
- warnings.warn(
- """The usage of role_id for AppRole authentication has
been deprecated.
- Please use connection login.""",
- AirflowProviderDeprecationWarning,
- stacklevel=2,
- )
- elif self.connection.extra_dejson.get("role_id"):
- role_id = self.connection.extra_dejson.get("role_id")
- warnings.warn(
- """The usage of role_id in connection extra for AppRole
authentication has been
- deprecated. Please use connection login.""",
- AirflowProviderDeprecationWarning,
- stacklevel=2,
- )
- elif self.connection.login:
+ if self.connection.login:
Review Comment:
Maybe join with the `if` above? (`if auth_type == "approle" and
self.connection.login:`)
--
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]