Skip to content

Commit fb4107d

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ccba19f + c6c27ea commit fb4107d

21 files changed

+837
-608
lines changed

doc/changes/unreleased.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
## Features
44

55
* #42: Optionally wait until SLC is deployed to all nodes in the database cluster
6+
* #45: Moving the SCL build and export from the TE to PEC.

exasol/python_extension_common/connections/pyexasol_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def open_pyexasol_connection(
5353
pat=saas_token)
5454
else:
5555
raise ValueError('Incomplete parameter list. '
56-
'Please either provide the parameters [dns, db_user, db_pass] '
56+
'Please either provide the parameters [dsn, db_user, db_pass] '
5757
'for an On-Prem database or [saas_url, saas_account_id, '
5858
'saas_database_id or saas_database_name, saas_token] '
5959
'for a SaaS database.')

exasol/python_extension_common/deployment/__init__.py

Whitespace-only changes.

exasol/python_extension_common/deployment/extract_validator.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
import pyexasol # type: ignore
44

55
from datetime import datetime, timedelta
6+
from textwrap import dedent
67
from typing import Callable, List
78
from tenacity import Retrying
89
from tenacity.wait import wait_fixed
910
from tenacity.stop import stop_after_delay
1011

11-
from exasol.python_extension_common.deployment.language_container_validator import (
12-
temp_schema
13-
)
14-
1512
MANIFEST_FILE = "exasol-manifest.json"
1613

1714

@@ -74,8 +71,7 @@ def _create_manifest_udf(self, language_alias: str, udf_name: str):
7471
Much more a later statement "CREATE SCRIPT" will fail with an error
7572
message. Hence we need to use a retry here, as well.
7673
"""
77-
self._pyexasol_conn.execute(
78-
f"""
74+
self._pyexasol_conn.execute(dedent(f"""
7975
CREATE OR REPLACE {language_alias} SET SCRIPT
8076
{udf_name}(my_path VARCHAR(256))
8177
EMITS (node INTEGER, manifest BOOL) AS
@@ -84,7 +80,7 @@ def run(ctx):
8480
ctx.emit(exa.meta.node_id, os.path.isfile(ctx.my_path))
8581
/
8682
"""
87-
)
83+
))
8884

8985
def _check_all_nodes_with_retry(self, udf_name: str, nproc: int, manifest: str, timeout: timedelta):
9086
for attempt in Retrying(
@@ -97,7 +93,7 @@ def _check_all_nodes_with_retry(self, udf_name: str, nproc: int, manifest: str,
9793
def _check_all_nodes(self, udf_name: str, nproc: int, manifest: str):
9894
result = self._pyexasol_conn.execute(
9995
f"""
100-
SELECT {udf_name}({manifest})
96+
SELECT {udf_name}('{manifest}')
10197
FROM VALUES BETWEEN 1 AND {nproc} t(i) GROUP BY i
10298
"""
10399
).fetchall()
@@ -117,8 +113,9 @@ def verify_all_nodes(self, schema: str, language_alias: str, bfs_archive_path: b
117113
still nodes pending, for which the extraction could not be verified,
118114
yet.
119115
"""
120-
manifest = f"{bfs_archive_path.as_udf_path()}/{MANIFEST_FILE}"
121-
nproc = self._pyexasol_conn.execute("SELECT nproc()").fetchone()
116+
# manifest = f"{bfs_archive_path.as_udf_path()}/{MANIFEST_FILE}"
117+
manifest = "/exaudf/exaudfclient_py3"
118+
nproc = self._pyexasol_conn.execute("SELECT nproc()").fetchone()[0]
122119
udf_name = _udf_name(schema, language_alias)
123120
start = datetime.now()
124121
try:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from pathlib import Path
2+
from typing import Dict
3+
4+
from exasol_script_languages_container_tool.lib.tasks.build.docker_flavor_image_task import DockerFlavorAnalyzeImageTask # type: ignore
5+
6+
7+
class AnalyzeDependencies(DockerFlavorAnalyzeImageTask):
8+
def get_build_step(self) -> str:
9+
return "dependencies"
10+
11+
def requires_tasks(self):
12+
return {}
13+
14+
def get_path_in_flavor(self):
15+
return "flavor_base"
16+
17+
class AnalyzeRelease(DockerFlavorAnalyzeImageTask):
18+
def get_build_step(self) -> str:
19+
return "release"
20+
21+
def requires_tasks(self):
22+
return {"dependencies": AnalyzeDependencies}
23+
24+
def get_path_in_flavor(self):
25+
return "flavor_base"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requirements.txt
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM exasol/script-language-container:template-Exasol-all-python-3.10-release_BFRSH344TDRPT7LK2FBOJK4KBIDW6A253FFPYEUYT4O2ERFMTCNA
2+
3+
Run mkdir /project
4+
COPY dependencies/requirements.txt /project/requirements.txt
5+
RUN python3.10 -m pip install -r /project/requirements.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PYTHON3_FLAVOR=localzmq+protobuf:///{{ bucketfs_name }}/{{ bucket_name }}/{{ path_in_bucket }}{{ release_name }}?lang=python#buckets/{{ bucketfs_name }}/{{ bucket_name }}/{{ path_in_bucket }}{{ release_name }}/exaudf/exaudfclient_py3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM {{ dependencies }}
2+
3+
COPY release/dist /project/dist
4+
RUN python3.10 -m pip install --no-deps /project/dist/*.whl
5+
6+
RUN mkdir -p /build_info/actual_installed_packages/release && \
7+
/scripts/list_installed_scripts/list_installed_apt.sh > /build_info/actual_installed_packages/release/apt_get_packages && \
8+
/scripts/list_installed_scripts/list_installed_pip.sh python3.10 > /build_info/actual_installed_packages/release/python3_pip_packages

0 commit comments

Comments
 (0)