Skip to content

Commit c76ef87

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 898f06c + a381520 commit c76ef87

File tree

8 files changed

+572
-453
lines changed

8 files changed

+572
-453
lines changed

doc/changes/changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 📝 Changes
22

33
* [unreleased](unreleased.md)
4+
* [0.8.0](changes_0.8.0.md)
45
* [0.7.0](changes_0.7.0.md)
56
* [0.6.0](changes_0.6.0.md)
67
* [0.5.0](changes_0.5.0.md)
@@ -15,6 +16,7 @@
1516
hidden:
1617
---
1718
unreleased
19+
changes_0.8.0
1820
changes_0.7.0
1921
changes_0.6.0
2022
changes_0.5.0

doc/changes/changes_0.8.0.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 0.8.0 - 2024-10-14
2+
3+
## Features
4+
5+
* #52: Added timeout options for SLC deployer to CLI
6+
* #79 Added function `get_cli_arg` that makes a string CLI argument from an option and its value.
7+
Also allowed passing an option name instead of the `StdParams` in the following two functions:
8+
`create_std_option`, `check_params`.
9+
10+
## Bug fixing
11+
12+
* #78 Missing default value in the definition of `StdParams.path_in_bucket`.
13+
14+
## Documentation
15+
16+
* #81 Updated the documentation on the CLI commands, following the introduction of the standard
17+
CLI parameters.

doc/changes/unreleased.md

-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
11
# Unreleased
2-
3-
## Features
4-
5-
* #52: Added timeout options for SLC deployer to CLI
6-
* #79 Added function `get_cli_arg` that makes a string CLI argument from an option and its value.
7-
Also allowed passing an option name instead of the `StdParams` in the following two functions:
8-
`create_std_option`, `check_params`.
9-
10-
## Bug fixing
11-
12-
* #78 Missing default value in the definition of `StdParams.path_in_bucket`.

doc/user_guide/user-guide.md

+49-37
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
An extension would typically use [UDF scripts](https://docs.exasol.com/db/latest/database_concepts/udf_scripts.htm)
66
to enable certain custom functionality within a database. In most cases, UDF scripts must be backed by a
7-
[Script Language Container (SLC)](https://github.com/exasol/script-languages-release/), that must be installed in the
7+
[Script Language Container (SLC)](https://github.com/exasol/script-languages-release/), that needs to be installed in the
88
Exasol Database. An SLC allows the installation of the chosen programming language and necessary dependencies in the
99
Exasol Database.
1010

11-
The language container for a particular Extension gets downloaded and installed by executing a deployment script
12-
similar to the one below.
11+
The deployment of the language container is typically included in the installation of the Extension. It should also
12+
be possible to install the SLC separately using the same or a different CLI command. Please check the user guide of
13+
a particular extension for details. Below is an example of an extension installation command.
1314

1415
```buildoutcfg
15-
python -m <exasol_extension>.deploy language-container <options>
16+
python -m <exasol_extension>.deploy <options>
1617
```
1718

18-
The name of the script (```<exasol_extension>.deploy``` in the above command) and the command name
19-
(e.g. ```language-container```) can vary from one extension to another. Please check the user guide of a particular
20-
extension. The rest of the command line will have a common format. It will include some of the options defined below.
21-
The choice of options is primarily determined by the storage backend being used - On-Prem or SaaS.
19+
The name of the script (```<exasol_extension>.deploy``` in the above command) can vary from one extension to another.
20+
The rest of the command line will have a common format. It will include some of the options defined below. The choice
21+
of options is primarily determined by the storage backend being used - On-Prem or SaaS.
2222

2323
### List of options
2424

@@ -32,36 +32,38 @@ an option in the command line, without providing its value. In this case, the co
3232
interactively. For long values, such as the SaaS account id, it is more practical to copy/paste the value from
3333
another source.
3434

35-
| Option name | On-Prem | SaaS | Comment |
36-
|:-----------------------------|:-------:|:----:|:--------------------------------------------------------|
37-
| dsn | [x] | | i.e. <db_host:db_port> |
38-
| db-user | [x] | | |
39-
| db-pass | [x] | | Env. [DB_PASSWORD] |
40-
| bucketfs-name | [x] | | |
41-
| bucketfs-host | [x] | | |
42-
| bucketfs-port | [x] | | |
43-
| bucketfs-user | [x] | | |
44-
| bucketfs-password | [x] | | Env. [BUCKETFS_PASSWORD] |
45-
| bucketfs-use-https | [x] | | Optional boolean, defaults to False |
46-
| bucket | [x] | | |
47-
| saas-url | | [x] | Env. [SAAS_HOST] |
48-
| saas-account-id | | [x] | Env. [SAAS_ACCOUNT_ID] |
49-
| saas-database-id | | [x] | Optional, Env. [SAAS_DATABASE_ID] |
50-
| saas-database-name | | [x] | Optional, provide if the database_id is unknown |
51-
| saas-token | | [x] | Env. [SAAS_TOKEN] |
52-
| path-in-bucket | [x] | [x] | |
53-
| language-alias | [x] | [x] | |
35+
| Option name | On-Prem | SaaS | Comment |
36+
|:-----------------------------|:-------:|:----:|:-------------------------------------------------------------------|
37+
| dsn | [x] | | i.e. <db_host:db_port> |
38+
| db-user | [x] | | |
39+
| db-pass | [x] | | Env. [DB_PASSWORD] |
40+
| bucketfs-name | [x] | | |
41+
| bucketfs-host | [x] | | |
42+
| bucketfs-port | [x] | | |
43+
| bucketfs-user | [x] | | |
44+
| bucketfs-password | [x] | | Env. [BUCKETFS_PASSWORD] |
45+
| bucketfs-use-https | [x] | | Optional boolean, defaults to False |
46+
| bucket | [x] | | |
47+
| saas-url | | [x] | Env. [SAAS_HOST] |
48+
| saas-account-id | | [x] | Env. [SAAS_ACCOUNT_ID] |
49+
| saas-database-id | | [x] | Optional, Env. [SAAS_DATABASE_ID] |
50+
| saas-database-name | | [x] | Optional, provide if the database_id is unknown |
51+
| saas-token | | [x] | Env. [SAAS_TOKEN] |
52+
| path-in-bucket | [x] | [x] | |
53+
| language-alias | [x] | [x] | |
5454
| schema | [x] | [x] | Required if the user has no permission to create a database schema |
55-
| version | [x] | [x] | Optional, provide for downloading SLC from GitHub |
56-
| container-file | [x] | [x] | Optional, provide for uploading SLC file |
57-
| ssl-cert-path | [x] | [x] | Optional |
58-
| [no-]use-ssl-cert-validation | [x] | [x] | Optional boolean, defaults to True |
59-
| ssl-client-cert-path | [x] | | Optional |
60-
| ssl-client-private-key | [x] | | Optional |
61-
| [no-]upload-container | [x] | [x] | Optional boolean, defaults to True |
62-
| [no-]alter-system | [x] | [x] | Optional boolean, defaults to True |
63-
| [no-]allow-override | [x] | [x] | Optional boolean, defaults to False |
64-
| [no-]wait_for_completion | [x] | [x] | Optional boolean, defaults to True |
55+
| version | [x] | [x] | Optional, provide for downloading SLC from GitHub |
56+
| container-file | [x] | [x] | Optional, provide for uploading SLC file |
57+
| ssl-cert-path | [x] | [x] | Optional |
58+
| [no-]use-ssl-cert-validation | [x] | [x] | Optional boolean, defaults to True |
59+
| ssl-client-cert-path | [x] | | Optional |
60+
| ssl-client-private-key | [x] | | Optional |
61+
| [no-]upload-container | [x] | [x] | Optional boolean, defaults to True |
62+
| [no-]alter-system | [x] | [x] | Optional boolean, defaults to True |
63+
| [no-]allow-override | [x] | [x] | Optional boolean, defaults to False |
64+
| [no-]wait-for-completion | [x] | [x] | Optional boolean, defaults to True |
65+
| deploy-timeout-minutes | [x] | [x] | Defaults to 10 minutes. |
66+
| [no-]display-progress | [x] | [x] | Optional boolean, defaults to True |
6567

6668
### Container selection
6769

@@ -109,3 +111,13 @@ has already been uploaded one can use the `--no-upload-container` option to skip
109111
By default, overriding language activation is not permitted. If a language with the same alias has already
110112
been activated the command will result in an error. The activation can be overridden with the use of
111113
the `--allow-override` option.
114+
115+
## BucketFS connection object
116+
117+
Some extensions require the user to create a BucketFS connection object encapsulating the BucketFS credentials.
118+
The creation of such an object in the database would also be a part of the extension installation. Like the
119+
language container, the connection object can be created separately, using the same or a different command.
120+
Please check the documentation of a particular extension for details.
121+
122+
Most of the options listed above in the Language Container Deployer sections are also relevant for the creation
123+
of the connection object, should it be performed in a separate command.

exasol/python_extension_common/cli/language_container_deployer_cli.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from pathlib import Path
2+
from datetime import timedelta
23

3-
from exasol.python_extension_common.deployment.language_container_deployer import LanguageContainerDeployer
4+
from exasol.python_extension_common.deployment.language_container_deployer import (
5+
LanguageContainerDeployer, display_extract_progress, ExtractValidator)
46
from exasol.python_extension_common.connections.pyexasol_connection import open_pyexasol_connection
57
from exasol.python_extension_common.connections.bucketfs_location import create_bucketfs_location
68
from exasol.python_extension_common.cli.std_options import StdParams
@@ -35,10 +37,17 @@ def __call__(self, **kwargs):
3537
alter_system = kwargs[StdParams.alter_system.name]
3638
allow_override = kwargs[StdParams.allow_override.name]
3739
wait_for_completion = kwargs[StdParams.wait_for_completion.name]
40+
deploy_timeout_minutes = kwargs[StdParams.deploy_timeout_minutes.name]
41+
display_progress = kwargs[StdParams.display_progress.name]
3842

43+
display_callback = display_extract_progress if display_progress else None
44+
extract_validator = ExtractValidator(pyexasol_connection,
45+
timedelta(minutes=deploy_timeout_minutes),
46+
callback=display_callback)
3947
deployer = LanguageContainerDeployer(pyexasol_connection,
4048
language_alias,
41-
bucketfs_location)
49+
bucketfs_location,
50+
extract_validator)
4251
if not upload_container:
4352
deployer.run(alter_system=alter_system,
4453
allow_override=allow_override,

0 commit comments

Comments
 (0)