-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/#52-Added_timeout_options_for_SLC_de…
…ployer_to_CLI
- Loading branch information
Showing
24 changed files
with
1,409 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 0.6.0 - 2024-09-23 | ||
|
||
This release allows using the `extract_validator` for SLCs, even when lacking the permissions to create a database schema. | ||
|
||
## Features | ||
|
||
* #41: Make `temp_schema optional` for `wait_for_completion`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 0.7.0 - 2024-10-07 | ||
|
||
## Features | ||
|
||
* #66: Implemented a standard CLI options builder. | ||
* #70: Implemented a CLI callback function for the language container deployment. | ||
* #69: Added create_bucketfs_location function. | ||
* #75: Added create_bucketfs_location_from_conn_object function. | ||
* #74: Implemented a CLI callback function for creating a bucket-fs connection object. | ||
|
||
# Refactoring | ||
|
||
* #68: Made open_pyexasol_connection(...) using kwargs derived from the cli options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
exasol/python_extension_common/cli/bucketfs_conn_object_cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import exasol.python_extension_common.connections.bucketfs_location as bl | ||
|
||
|
||
class BucketfsConnObjectCli: | ||
def __init__(self, conn_name_arg: str): | ||
self._conn_name_arg = conn_name_arg | ||
|
||
def __call__(self, **kwargs): | ||
conn_name = kwargs.pop(self._conn_name_arg) | ||
bl.create_bucketfs_conn_object(conn_name=conn_name, **kwargs) |
61 changes: 61 additions & 0 deletions
61
exasol/python_extension_common/cli/language_container_deployer_cli.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from pathlib import Path | ||
|
||
from exasol.python_extension_common.deployment.language_container_deployer import LanguageContainerDeployer | ||
from exasol.python_extension_common.connections.pyexasol_connection import open_pyexasol_connection | ||
from exasol.python_extension_common.connections.bucketfs_location import create_bucketfs_location | ||
from exasol.python_extension_common.cli.std_options import StdParams | ||
|
||
|
||
class LanguageContainerDeployerCli: | ||
""" | ||
The class provides a CLI callback function that creates and runs the | ||
LangaugeContainerDeployer. | ||
At first glance, it may look a bit over-designed. The reason for wrapping a | ||
callback function in a class is to let the user define the option names for the | ||
container URL and container name. These options are not defined in the StdParams | ||
but rather generated by formatters. The user can give them arbitrary names. | ||
Hence, we don't want to assume any particular names in the callback function. | ||
""" | ||
|
||
def __init__(self, | ||
container_url_arg: str | None = None, | ||
container_name_arg: str | None = None) -> None: | ||
self._container_url_arg = container_url_arg | ||
self._container_name_arg = container_name_arg | ||
|
||
def __call__(self, **kwargs): | ||
|
||
pyexasol_connection = open_pyexasol_connection(**kwargs) | ||
bucketfs_location = create_bucketfs_location(**kwargs) | ||
|
||
language_alias = kwargs[StdParams.language_alias.name] | ||
container_file = kwargs[StdParams.container_file.name] | ||
upload_container = kwargs[StdParams.upload_container.name] | ||
alter_system = kwargs[StdParams.alter_system.name] | ||
allow_override = kwargs[StdParams.allow_override.name] | ||
wait_for_completion = kwargs[StdParams.wait_for_completion.name] | ||
|
||
deployer = LanguageContainerDeployer(pyexasol_connection, | ||
language_alias, | ||
bucketfs_location) | ||
if not upload_container: | ||
deployer.run(alter_system=alter_system, | ||
allow_override=allow_override, | ||
wait_for_completion=wait_for_completion) | ||
elif container_file: | ||
deployer.run(container_file=Path(container_file), | ||
alter_system=alter_system, | ||
allow_override=allow_override, | ||
wait_for_completion=wait_for_completion) | ||
elif kwargs.get(self._container_url_arg) and kwargs.get(self._container_name_arg): | ||
deployer.download_and_run(kwargs[self._container_url_arg], | ||
kwargs[self._container_name_arg], | ||
alter_system=alter_system, | ||
allow_override=allow_override, | ||
wait_for_completion=wait_for_completion) | ||
else: | ||
raise ValueError("To upload a language container either its release version " | ||
f"(--{StdParams.version.name}) or a path of the already " | ||
f"downloaded container file (--{StdParams.container_file.name}) " | ||
"must be provided.") |
Oops, something went wrong.