Skip to content
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
2 changes: 1 addition & 1 deletion projects/vdk-control-cli/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ tabulate
urllib3>=1.26.5
vdk-control-api-auth

vdk-control-service-api==1.0.9
vdk-control-service-api==1.0.10
2 changes: 1 addition & 1 deletion projects/vdk-control-cli/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ install_requires =
requests>=2.25
setuptools>=47.0
pluggy
vdk-control-service-api==1.0.9
vdk-control-service-api==1.0.10
tabulate
requests_oauthlib>=1.0
urllib3>=1.26.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import click
import click_spinner
from urllib3 import HTTPResponse
from taurus_datajob_api import ApiResponse
from vdk.internal.control.configuration.defaults_config import load_default_team_name
from vdk.internal.control.exception.vdk_exception import VDKException
from vdk.internal.control.job.job_archive import JobArchive
Expand All @@ -29,7 +29,7 @@ def download(self, team: str, name: str, path: str):
try:
log.info(f"Downloading data job {name} in {path}/{name} ...")
with click_spinner.spinner():
response: HTTPResponse = self.sources_api.data_job_sources_download(
response = self.sources_api.data_job_sources_download_with_http_info(
team_name=team, job_name=name, _preload_content=False
)
self.__write_response_to_archive(job_archive_path, response)
Expand All @@ -42,10 +42,10 @@ def download(self, team: str, name: str, path: str):
self.__cleanup_archive(job_archive_path)

@staticmethod
def __write_response_to_archive(job_archive_path: str, response: HTTPResponse):
def __write_response_to_archive(job_archive_path: str, response: ApiResponse):
log.debug(f"Write data job source to {job_archive_path}")
with open(job_archive_path, "wb") as w:
w.write(response.data)
w.write(response.raw_data)

@staticmethod
def __validate_job_path(path: str, name: str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def __init__(self, rest_api_url: str):
@ApiClientErrorDecorator()
def download(self, team: str, name: str, path: str):
keytab_file_path = os.path.join(path, f"{name}.keytab")
response: HTTPResponse = self.jobs_api.data_job_keytab_download(
response = self.jobs_api.data_job_keytab_download_with_http_info(
team_name=team, job_name=name, _preload_content=False
)
with open(keytab_file_path, "wb") as w:
w.write(response.data)
w.write(response.raw_data)
log.info(f"Saved keytab in {keytab_file_path}")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def start(
args=self.__validate_and_parse_args(arguments),
)
log.debug(f"Starting job with request {execution_request}")
_, _, headers = self.__execution_api.data_job_execution_start_with_http_info(
headers = self.__execution_api.data_job_execution_start_with_http_info(
team_name=team,
job_name=name,
deployment_id="production", # TODO
data_job_execution_request=execution_request,
)
).headers
log.debug(f"Received headers: {headers}")

location = headers["Location"]
Expand Down