Skip to content

Commit

Permalink
#212: Updating dependency to exasol-integration-test-docker-environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed May 16, 2024
1 parent f906087 commit 1028eee
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 173 deletions.
4 changes: 2 additions & 2 deletions .github/actions/prepare_poetry_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
description: 'The Python version to use'
required: true
default: '3.8'
default: '3.10'
runs:
using: "composite"
steps:
Expand All @@ -13,7 +13,7 @@ runs:
python-version: ${{ inputs.python-version }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
poetry-version: 1.8.2
- name: Poetry install
run: poetry install
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
exasol_version:
- "default"
python_version:
- 3.8
- 3.10
test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
runs-on: ubuntu-latest
name: ${{ matrix.test-path.name }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ the following prerequisites:
* sha512sum
* sed
* [curl](https://curl.se/)
* Python 3 (>=3.8)
* Python 3 (>=3.10)
* Pip


Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changes

* [0.19.0](changes_0.19.0.md)
* [0.18.3](changes_0.18.3.md)
* [0.18.2](changes_0.18.2.md)
* [0.18.1](changes_0.18.1.md)
Expand Down
12 changes: 12 additions & 0 deletions doc/changes/changes_0.19.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
9 Script-Languages-Container-Tool 0.19.0, released 2024-05-10

Code name: Updated dependencies

## Summary

This releases updated the dependency to exasol-integration-test-docker-environment.

## Bugs

- #209: Fixed tests

8 changes: 4 additions & 4 deletions docker_runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive

COPY ext/01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc
Expand All @@ -7,7 +7,7 @@ RUN apt-get -y update && \
apt-get -y install --no-install-recommends\
ca-certificates \
locales \
python3.8-venv \
python3.10-venv \
git \
bash \
curl && \
Expand All @@ -17,7 +17,7 @@ RUN apt-get -y update && \
apt-get -y autoremove && \
ldconfig

RUN curl https://bootstrap.pypa.io/get-pip.py | python3.8
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.10

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand All @@ -30,7 +30,7 @@ COPY LICENSE /script-languages-container-tool/LICENSE
COPY README.md /script-languages-container-tool/README.md

WORKDIR /script-languages-container-tool
RUN python3.8 -m pip install .
RUN python3.10 -m pip install .

RUN mkdir -p runner
COPY docker_runner/ /docker_runner
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def run_db_test(flavor_path: Tuple[str, ...],
external_exasol_bucketfs_port: int,
external_exasol_db_user: Optional[str],
external_exasol_db_password: Optional[str],
external_exasol_ssh_port: Optional[int],
external_exasol_bucketfs_write_password: Optional[str],
external_exasol_xmlrpc_host: Optional[str],
external_exasol_xmlrpc_port: int,
Expand Down Expand Up @@ -161,6 +162,7 @@ def run_db_test(flavor_path: Tuple[str, ...],
external_exasol_bucketfs_port=external_exasol_bucketfs_port,
external_exasol_db_user=external_exasol_db_user,
external_exasol_db_password=external_exasol_db_password,
external_exasol_ssh_port=external_exasol_ssh_port,
external_exasol_bucketfs_write_password=external_exasol_bucketfs_write_password,
external_exasol_xmlrpc_host=external_exasol_xmlrpc_host,
external_exasol_xmlrpc_port=external_exasol_xmlrpc_port,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def run_db_test(flavor_path: Tuple[str, ...],
external_exasol_bucketfs_port: int = 6583,
external_exasol_db_user: Optional[str] = None,
external_exasol_db_password: Optional[str] = None,
external_exasol_ssh_port: int = 22,
external_exasol_bucketfs_write_password: Optional[str] = None,
external_exasol_xmlrpc_host: Optional[str] = None,
external_exasol_xmlrpc_port: int = 443,
Expand Down Expand Up @@ -137,6 +138,7 @@ def root_task_generator() -> DependencyLoggerBaseTask:
external_exasol_bucketfs_port=external_exasol_bucketfs_port,
external_exasol_db_user=external_exasol_db_user,
external_exasol_db_password=external_exasol_db_password,
external_exasol_ssh_port=external_exasol_ssh_port,
external_exasol_bucketfs_write_password=external_exasol_bucketfs_write_password,
external_exasol_xmlrpc_host=external_exasol_xmlrpc_host,
external_exasol_xmlrpc_port=external_exasol_xmlrpc_port,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
from typing import Generator, Any, Dict

import luigi
from exasol_integration_test_docker_environment.lib.base.db_os_executor import DbOsExecFactory, SshExecFactory, \
DockerClientFactory, DockerExecFactory
from exasol_integration_test_docker_environment.lib.base.json_pickle_parameter import JsonPickleParameter
from exasol_integration_test_docker_environment.lib.data.database_info import DatabaseInfo
from exasol_integration_test_docker_environment.lib.test_environment.parameter.docker_db_test_environment_parameter import \
DbOsAccess

from exasol_script_languages_container_tool.lib.tasks.export.export_containers import ExportFlavorContainer
from exasol_script_languages_container_tool.lib.tasks.export.export_info import ExportInfo
from exasol_script_languages_container_tool.lib.tasks.test.populate_test_engine import PopulateTestEngine
Expand Down Expand Up @@ -63,6 +70,12 @@ def run_task(self):
test_results = yield from self.run_test(self.test_environment_info, export_info)
self.return_object(test_results)

def _executor_factory(self, database_info: DatabaseInfo) -> DbOsExecFactory:
if self.db_os_access == DbOsAccess.SSH:
return SshExecFactory.from_database_info(database_info)
client_factory = DockerClientFactory(timeout=100000)
return DockerExecFactory(database_info.container_info.db_container_name, client_factory)

def upload_container(self, database_credentials: DatabaseCredentials, export_info: ExportInfo):
reuse = \
self.reuse_database and \
Expand All @@ -75,7 +88,8 @@ def upload_container(self, database_credentials: DatabaseCredentials, export_inf
test_environment_info=self.test_environment_info,
release_name=export_info.name,
reuse_uploaded=reuse,
bucketfs_write_password=database_credentials.bucketfs_write_password
bucketfs_write_password=database_credentials.bucketfs_write_password,
executor_factory=self._executor_factory(self.test_environment_info.database_info)
)
yield from self.run_dependencies(upload_task)

Expand Down
Loading

0 comments on commit 1028eee

Please sign in to comment.