diff --git a/doc/changes/changes_0.2.6.md b/doc/changes/changes_0.2.6.md index 7880631..2b663c2 100644 --- a/doc/changes/changes_0.2.6.md +++ b/doc/changes/changes_0.2.6.md @@ -19,4 +19,6 @@ This release adds the extension wrappers, the ITDE manager and makes full use of * Add a new function - `start_itde` that re-starts an existing docker container. * #63: [Integration tests for cloud-storage-extension code](https://github.com/exasol/notebook-connector/issues/63) * #75: Connect the current docker container with the ITDE docker network in bring_itde_up -* #78: Added removal of the current container from docker network of the ITDE \ No newline at end of file +* #78: Added removal of the current container from docker network of the ITDE +* #80: Pointed the Transformers Extension wrapper to the version 0.9.0 of the Transformers Extension. +* #81: Renamed the secret store keys "aws_bucket" and "aws_role" to respectively "sme_aws_bucket" and "sme_aws_role". \ No newline at end of file diff --git a/exasol/ai_lab_config.py b/exasol/ai_lab_config.py index 228f62c..bbeff4b 100644 --- a/exasol/ai_lab_config.py +++ b/exasol/ai_lab_config.py @@ -23,11 +23,9 @@ class AILabConfig(Enum): mem_size = auto() disk_size = auto() huggingface_token = auto() - aws_bucket = auto() aws_region = auto() aws_access_key_id = auto() aws_secret_access_key = auto() - aws_role = auto() itde_container = auto() itde_volume = auto() itde_network = auto() @@ -35,4 +33,6 @@ class AILabConfig(Enum): te_models_bfs_dir = auto() te_hf_connection = auto() te_models_cache_dir = auto() + sme_aws_bucket = auto() + sme_aws_role = auto() sme_aws_connection = auto() diff --git a/exasol/extension_wrapper_common.py b/exasol/extension_wrapper_common.py index 7bbfe08..2953c55 100644 --- a/exasol/extension_wrapper_common.py +++ b/exasol/extension_wrapper_common.py @@ -90,7 +90,8 @@ def encapsulate_huggingface_token(conf: Secrets, connection_name: str) -> None: conn.execute(query=sql, query_params=query_params) -def encapsulate_aws_credentials(conf: Secrets, connection_name: str) -> None: +def encapsulate_aws_credentials(conf: Secrets, connection_name: str, + s3_bucket_key: CKey) -> None: """ Creates a connection object in the database encapsulating the address of an AWS S3 bucket and AWS access credentials. @@ -102,11 +103,13 @@ def encapsulate_aws_credentials(conf: Secrets, connection_name: str) -> None: aws_secret_access_key), as well as the DB connection parameters. connection_name: Name for the connection object to be created. + s3_bucket_key: + The secret store key of the AWS S3 bucket name. """ sql = f""" CREATE OR REPLACE CONNECTION [{connection_name}] - TO 'https://{conf.get(CKey.aws_bucket)}.s3.{conf.get(CKey.aws_region)}.amazonaws.com/' + TO 'https://{conf.get(s3_bucket_key)}.s3.{conf.get(CKey.aws_region)}.amazonaws.com/' USER {{ACCESS_ID!s}} IDENTIFIED BY {{SECRET_KEY!s}} """ diff --git a/exasol/sagemaker_extension_wrapper.py b/exasol/sagemaker_extension_wrapper.py index 4f94433..45ce670 100644 --- a/exasol/sagemaker_extension_wrapper.py +++ b/exasol/sagemaker_extension_wrapper.py @@ -137,7 +137,7 @@ def initialize_sme_extension(conf: Secrets, if run_deploy_scripts: deploy_scripts(conf) if run_encapsulate_aws_credentials: - encapsulate_aws_credentials(conf, aws_conn_name) + encapsulate_aws_credentials(conf, aws_conn_name, CKey.sme_aws_bucket) # Save the connection object name in the secret store. conf.save(CKey.sme_aws_connection, aws_conn_name) diff --git a/exasol/transformers_extension_wrapper.py b/exasol/transformers_extension_wrapper.py index 9fc29fb..b50ae96 100644 --- a/exasol/transformers_extension_wrapper.py +++ b/exasol/transformers_extension_wrapper.py @@ -29,7 +29,7 @@ LANGUAGE_ALIAS = "PYTHON3_TE" -LATEST_KNOWN_VERSION = "0.7.0" +LATEST_KNOWN_VERSION = "0.9.0" # Activation SQL for the Transformers Extension will be saved in the secret # store with this key. diff --git a/test/integration/test_sagemaker_extension_wrapper.py b/test/integration/test_sagemaker_extension_wrapper.py index 50f1477..425b848 100644 --- a/test/integration/test_sagemaker_extension_wrapper.py +++ b/test/integration/test_sagemaker_extension_wrapper.py @@ -17,7 +17,7 @@ def test_initialize_sme_extension( ): # Here are fake AWS credentials. Should be fine since we are only testing # the deployment. - secrets.save(CKey.aws_bucket, "NoneExistent") + secrets.save(CKey.sme_aws_bucket, "NoneExistent") secrets.save(CKey.aws_region, "neverland") secrets.save(CKey.aws_access_key_id, "FAKEKEYIDDONTUSEIT") secrets.save(CKey.aws_secret_access_key, "FakeSecretAccessKeyDontTryToUseIt")