diff --git a/exasol_sagemaker_extension/deployment/language_container.py b/exasol_sagemaker_extension/deployment/language_container.py index 735566a..7bbefa9 100644 --- a/exasol_sagemaker_extension/deployment/language_container.py +++ b/exasol_sagemaker_extension/deployment/language_container.py @@ -16,11 +16,13 @@ def language_container_factory(): yield container_builder -def export_slc(export_dir: str): +def export_slc(export_dir: str) -> str: if not os.path.isdir(export_dir): os.makedirs(export_dir) with language_container_factory() as container_builder: - container_builder.export(export_dir) + export_result = container_builder.export(export_dir) + export_info = export_result.export_infos[str(container_builder.flavor_path)]["release"] + return export_info.cache_file if __name__ == '__main__': diff --git a/tests/integration_tests/deployment/test_deploy_cli.py b/tests/integration_tests/deployment/test_deploy_cli.py index c6d2fd6..81932a3 100644 --- a/tests/integration_tests/deployment/test_deploy_cli.py +++ b/tests/integration_tests/deployment/test_deploy_cli.py @@ -61,11 +61,11 @@ def std_param_to_opt(std_param: StdParams) -> str: # This method should be implemented in the StdParams return f'--{std_param.name.replace("_", "-")}' - export_slc(str(tmp_path)) + container_file = export_slc(str(tmp_path)) args_string = (f'{cli_args} ' f'{std_param_to_opt(StdParams.schema)} "{DB_SCHEMA}" ' - f'{std_param_to_opt(StdParams.container_file)} "{tmp_path}"') + f'{std_param_to_opt(StdParams.container_file)} "{container_file}"') runner = CliRunner() result = runner.invoke(deploy_command, args=args_string, catch_exceptions=False)