Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdk-dag, vdk-control-cli, airflow-provider-vdk: step using deprecated field #2706

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def login(
auth_discovery_url=oauth2_discovery_url,
authorization_url=oauth2_exchange_url,
auth_type=auth_type,
cache_locally=True,
)
auth.authenticate()
click.echo("Login Successful")
Expand Down Expand Up @@ -149,7 +148,6 @@ def login(
authorization_url=api_token_authorization_url,
token=api_token,
auth_type=auth_type,
cache_locally=True,
)
try:
apikey_auth.authenticate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, rest_api_url):
self.config.client_side_validation = False
self.config.verify_ssl = self.vdk_config.http_verify_ssl

auth = Authentication(cache_locally=True)
auth = Authentication()
# For now there's no need to add auto-update since this is called usually in a shell script
# and each command will have short execution life even when multiple requests to API are made.
self.config.access_token = auth.read_access_token()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
from taurus_datajob_api import DataJobExecutionRequest
from taurus_datajob_api import DataJobsExecutionApi
from urllib3 import Retry
from vdk.plugin.control_api_auth.auth_config import SingletonInMemoryCredentialsCache
from vdk.plugin.control_api_auth.authentication import Authentication


if sys.version_info >= (3, 8):
from functools import cached_property
else:
Expand Down Expand Up @@ -248,7 +250,7 @@ def _login(self) -> None:
token=self.conn.extra_dejson.get("token", None),
authorization_url=self.conn.extra_dejson.get("auth_server", None),
auth_type=self.conn.extra_dejson.get("auth_type", None),
cache_locally=False,
credentials_cache=SingletonInMemoryCredentialsCache(),
)
self.auth.authenticate()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,5 @@ def _get_access_token(self) -> str:
return self.auth.read_access_token()

def _login(self) -> None:
self.auth = Authentication(cache_locally=True)
self.auth = Authentication()
# self.auth.authenticate()