Skip to content

Commit

Permalink
Fixed Build
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed Sep 23, 2024
1 parent 8cb8a7b commit 829c480
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion exasol_advanced_analytics_framework/slc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def custom_slc_builder() -> LanguageContainerBuilder:
project_directory = find_path_backwards("pyproject.toml", __file__).parent
with IncrementalSlcBuilder( # LanguageContainerBuilder
container_name="exasol_advanced_analytics_framework_container",
language_alias="PYTHON3_AAF",
language_alias="PYTHON3_AAF", # removed in PEC version 0.5.0
) as builder:
builder.prepare_flavor(project_directory)
yield builder
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def _get_parameter(self, ctx):

def _create_bucketfs_location(self):
bucketfs_connection_obj = self.exa.get_connection(self.parameter.temporary_bfs_location_conn)
# causes IndexError: tuple index out of range
# in bucket_name = url_path.parts[1],
bucketfs_location_from_con = BucketFSFactory().create_bucketfs_location(
url=bucketfs_connection_obj.address,
user=bucketfs_connection_obj.user,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ polyfactory = "^2.8.0"
pytest-repeat = ">=0.9.1"
elasticsearch = "^8.6.1"
exasol-toolbox = ">=0.14.0"
exasol-python-extension-common = ">=0.4.0"
# 0.5.0 is available but includes a breaking change regarding the interface of LanguageContainerBuilder
exasol-python-extension-common = ">=0.4.0,<0.5.0"
exasol-script-languages-container-tool = "<1.0.0"
pytest-exasol-slc = ">=0.1.0"
pytest-exasol-backend = ">=0.3.0"
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/with_db/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def slc_builder(use_onprem, use_saas) -> LanguageContainerBuilder:

import exasol.bucketfs as bfs
from exasol.python_extension_common.deployment.language_container_deployer import LanguageContainerDeployer
# from pytest-plugins/pytest-slc/exasol/pytest_slc/__init__.py
BFS_CONTAINER_DIRECTORY = 'container'
# can be removed as soon as the following issues is fixed and
# a new version of PYTSLC is released
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,25 @@ def _deploy_scripts(db_conn) -> None:
# 'pat': saas_pat
# }


def _bucket_address(bucketfs_params) -> str:
# pytest-plugins/pytest-slc/exasol/pytest_slc/__init__.py defines
BFS_CONTAINER_DIRECTORY = 'container'
host_and_port = bucketfs_params["url"]
bucket_name = bucketfs_params["bucket_name"]
path_in_bucket = BFS_CONTAINER_DIRECTORY
service_name = bucketfs_params["service_name"]
return ( f"http://{host_and_port}/{bucket_name}/"
f"{path_in_bucket};{service_name}" )


def _create_bucketfs_connection(use_onprem, db_conn, bucketfs_params) -> str:
name = BUCKETFS_CONNECTION_NAME
if use_onprem:
# In general currently I disabled SaaS backend for AAF.
# Question: Should/Could this work for SaaS, too?
uri = bucketfs_params["url"]
uri = _bucket_address(bucketfs_params)
# uri = bucketfs_params["url"]
user = bucketfs_params["username"]
pwd = bucketfs_params["password"]
db_conn.execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,3 @@ def test_query_loop_integration_with_two_iteration(
and select_queries_from_query_handler == expected_query_list \
and view_cleanup_query, \
f"Not all required queries where executed {executed_queries}"


def test_x(database_with_slc):
pass

0 comments on commit 829c480

Please sign in to comment.