Skip to content

Commit

Permalink
Removing the language alias parameter from cli (#102)
Browse files Browse the repository at this point in the history
* Making the language alias fixed [run aws tests]

* Making the language alias fixed [run aws tests]
  • Loading branch information
ahsimb authored Dec 21, 2023
1 parent 8e0cf6b commit 1a53151
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 114 deletions.
1 change: 1 addition & 0 deletions doc/changes/changes_0.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ n/a
### Refactoring

- #97: Improving the container deployment using the container deployer from [transformers-extension](https://github.com/exasol/transformers-extension/)
- #99: Making the scripts deployer accepting a pyexasol connection
2 changes: 0 additions & 2 deletions doc/user_guide/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ Sagemaker Extension Package. See [the latest release](https://github.com/exasol/
--bucketfs-use-https <USE_HTTPS_BOOL> \
--bucket <BUCKETFS_NAME> \
--path-in-bucket <PATH_IN_BUCKET> \
--language-alias PYTHON3_SME \
--version <RELEASE_VERSION> \
--ssl-cert-path <ssl-cert-path> \
--use-ssl-cert-validation
Expand Down Expand Up @@ -128,7 +127,6 @@ There are two ways to install the language container: (1) using a python script
--bucketfs-password <BUCKETFS_PASSWORD> \
--bucket <BUCKETFS_NAME> \
--path-in-bucket <PATH_IN_BUCKET> \
--language-alias PYTHON3_SME \
--container-file <path/to/language_container_name.tar.gz>
```
Please note, that all considerations described in the Quick Installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

logger = logging.getLogger(__name__)

LANGUAGE_ALIAS = 'PYTHON3_SME'


def get_websocket_sslopt(use_ssl_cert_validation: bool = True,
ssl_trusted_ca: Optional[str] = None,
Expand Down Expand Up @@ -77,11 +79,12 @@ class LanguageContainerDeployer:

def __init__(self,
pyexasol_connection: pyexasol.ExaConnection,
language_alias: str,
bucketfs_location: BucketFSLocation) -> None:

self._bucketfs_location = bucketfs_location
self._language_alias = language_alias
# At the moment the language alias has to be a fixed one,
# as its value is hardcoded in the scripts.
self._language_alias = LANGUAGE_ALIAS
self._pyexasol_conn = pyexasol_connection
logger.debug(f"Init {LanguageContainerDeployer.__name__}")

Expand Down Expand Up @@ -244,7 +247,7 @@ def _check_if_requested_language_alias_already_exists(
def create(cls, bucketfs_name: str, bucketfs_host: str, bucketfs_port: int,
bucketfs_use_https: bool, bucketfs_user: str,
bucketfs_password: str, bucket: str, path_in_bucket: str,
dsn: str, db_user: str, db_password: str, language_alias: str,
dsn: str, db_user: str, db_password: str,
use_ssl_cert_validation: bool = True, ssl_trusted_ca: Optional[str] = None,
ssl_client_certificate: Optional[str] = None,
ssl_private_key: Optional[str] = None) -> "LanguageContainerDeployer":
Expand All @@ -264,4 +267,4 @@ def create(cls, bucketfs_name: str, bucketfs_host: str, bucketfs_port: int,
bucketfs_name, bucketfs_host, bucketfs_port, bucketfs_use_https,
bucketfs_user, bucketfs_password, bucket, path_in_bucket)

return cls(pyexasol_conn, language_alias, bucketfs_location)
return cls(pyexasol_conn, bucketfs_location)
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def clear_formatters(self):
@click.option('--db-user', type=str, required=True)
@click.option('--db-pass', prompt='db password', hide_input=True,
default=lambda: os.environ.get(DB_PASSWORD_ENVIRONMENT_VARIABLE, ""))
@click.option('--language-alias', type=str, default="PYTHON3_TE")
@click.option('--ssl-cert-path', type=str, default="")
@click.option('--ssl-client-cert-path', type=str, default="")
@click.option('--ssl-client-private-key', type=str, default="")
Expand All @@ -122,7 +121,6 @@ def language_container_deployer_main(
dsn: str,
db_user: str,
db_pass: str,
language_alias: str,
ssl_cert_path: str,
ssl_client_cert_path: str,
ssl_client_private_key: str,
Expand All @@ -145,7 +143,6 @@ def language_container_deployer_main(
dsn=dsn,
db_user=db_user,
db_password=db_pass,
language_alias=language_alias,
ssl_trusted_ca=ssl_cert_path,
ssl_client_certificate=ssl_client_cert_path,
ssl_private_key=ssl_client_private_key,
Expand Down
Loading

0 comments on commit 1a53151

Please sign in to comment.