Skip to content

Commit 766790d

Browse files
authored
#327/#328: Updated ITDE to 5.0.0 and updated Github secrets for Docker credentials (#329)
fixes #327 fixes #328
1 parent 2081d46 commit 766790d

File tree

11 files changed

+1045
-757
lines changed

11 files changed

+1045
-757
lines changed

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Integration Tests
33
on:
44
workflow_call:
55
secrets:
6-
DOCKER_USERNAME:
6+
CI4_DOCKERHUB_USERNAME:
77
required: true
8-
DOCKER_PASSWORD:
8+
CI4_DOCKERHUB_TOKEN:
99
required: true
1010
jobs:
1111

@@ -53,5 +53,5 @@ jobs:
5353
- name: Run test ${{ matrix.test-path.name }}
5454
run: poetry run -- python ${{ matrix.test-path.path }}
5555
env: # Set the secret as an input
56-
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
57-
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWORD }}
56+
DOCKER_USER: ${{ secrets.CI4_DOCKERHUB_USERNAME }}
57+
DOCKER_PASSWD: ${{ secrets.CI4_DOCKERHUB_TOKEN }}

.github/workflows/slow-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Slow-Checks
33
on:
44
workflow_call:
55
secrets:
6-
DOCKER_USERNAME:
6+
CI4_DOCKERHUB_USERNAME:
77
required: true
8-
DOCKER_PASSWORD:
8+
CI4_DOCKERHUB_TOKEN:
99
required: true
1010
jobs:
1111
integration-tests:

doc/changes/unreleased.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@
77
## Refactorings
88

99
- #313: Updated GPU Test Query and updated Poetry dependencies and PTB GH action
10-
- #320: Updated poetry dependencies and Github workflows by PTB 1.12.0.
10+
- #320: Updated poetry dependencies and Github workflows by PTB 1.12.0.
11+
- #328: Updated Github secrets for Docker credentials
12+
13+
## Dependencies
14+
15+
- #327: Updated ITDE to 5.0.0

exasol/slc/api/run_db_tests.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from exasol_integration_test_docker_environment.lib.test_environment.parameter.docker_db_test_environment_parameter import ( # pylint: disable=line-too-long
2727
DbOsAccess,
2828
)
29+
from exasol_integration_test_docker_environment.lib.test_environment.ports import Ports
2930
from exasol_integration_test_docker_environment.lib.utils.api_function_decorators import (
3031
cli_function,
3132
)
@@ -60,8 +61,8 @@ def run_db_test(
6061
additional_db_parameter: tuple[str, ...] = tuple(),
6162
docker_environment_variable: tuple[str, ...] = tuple(),
6263
external_exasol_db_host: Optional[str] = None,
63-
external_exasol_db_port: int = 8563,
64-
external_exasol_bucketfs_port: int = 2580,
64+
external_exasol_db_port: int = Ports.external.database,
65+
external_exasol_bucketfs_port: int = Ports.external.bucketfs_http,
6566
external_exasol_ssh_port: Optional[int] = None,
6667
external_exasol_db_user: Optional[str] = None,
6768
external_exasol_db_password: Optional[str] = None,
@@ -104,6 +105,7 @@ def run_db_test(
104105
use_job_specific_log_file: bool = True,
105106
compression_strategy: CompressionStrategy = defaultCompressionStrategy(),
106107
accelerator: Accelerator = defaultAccelerator(),
108+
external_exasol_bucketfs_https_port: int = Ports.external.bucketfs_https,
107109
) -> AllTestsResult:
108110
"""
109111
This command runs the integration tests in local docker-db.
@@ -157,10 +159,12 @@ def run_db_test(
157159
raise api_errors.MissingArgumentError("external_exasol_ssh_port")
158160

159161
docker_runtime = None
162+
itde_accelerator: tuple[str, ...] = ()
160163
if accelerator == Accelerator.NVIDA:
161-
additional_db_parameter += ("-enableAcceleratorDeviceDetection=1",)
162-
docker_runtime = "nvidia"
163-
docker_environment_variable += ("NVIDIA_VISIBLE_DEVICES=all",)
164+
itde_accelerator = ("nvidia=all",)
165+
add_db_param_accel_detection = "-enableAcceleratorDeviceDetection=1"
166+
if add_db_param_accel_detection not in additional_db_parameter:
167+
additional_db_parameter += (add_db_param_accel_detection,)
164168

165169
def root_task_generator() -> DependencyLoggerBaseTask:
166170
return generate_root_task(
@@ -191,7 +195,8 @@ def root_task_generator() -> DependencyLoggerBaseTask:
191195
max_start_attempts=max_start_attempts,
192196
external_exasol_db_host=external_exasol_db_host,
193197
external_exasol_db_port=external_exasol_db_port,
194-
external_exasol_bucketfs_port=external_exasol_bucketfs_port,
198+
external_exasol_bucketfs_http_port=external_exasol_bucketfs_port,
199+
external_exasol_bucketfs_https_port=external_exasol_bucketfs_https_port,
195200
external_exasol_db_user=external_exasol_db_user,
196201
external_exasol_db_password=external_exasol_db_password,
197202
external_exasol_ssh_port=external_exasol_ssh_port,
@@ -207,6 +212,7 @@ def root_task_generator() -> DependencyLoggerBaseTask:
207212
compression_strategy=compression_strategy,
208213
docker_runtime=docker_runtime,
209214
docker_environment_variables=docker_environment_variable,
215+
accelerator=itde_accelerator,
210216
)
211217

212218
return run_task(

exasol/slc/internal/tasks/test/test_runner_db_test_base_task.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
from exasol.slc.internal.tasks.upload.language_definition import LanguageDefinition
5858
from exasol.slc.models.flavor_ci_model import (
5959
FlavorCiConfig,
60-
TestConfig,
61-
TestSet,
6260
)
6361
from exasol.slc.models.run_db_test_result import RunDBTestsInTestConfigResult
6462

exasol/slc/models/accelerator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from enum import Enum
2-
from typing import List
32

43

54
class Accelerator(Enum):

exasol/slc/models/flavor_ci_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Optional
1+
from typing import Optional
22

33
from pydantic import BaseModel
44

exasol/slc/tool/commands/run_db_tests.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
system_options,
1313
)
1414
from exasol_integration_test_docker_environment.cli.options.test_environment_options import (
15-
docker_db_options,
1615
external_db_options,
1716
test_environment_options,
1817
)
1918
from exasol_integration_test_docker_environment.cli.termination_handler import (
2019
TerminationHandler,
2120
)
21+
from exasol_integration_test_docker_environment.lib.test_environment.ports import Ports
2222
from exasol_integration_test_docker_environment.lib.utils.cli_function_decorators import (
2323
add_options,
2424
)
@@ -36,6 +36,7 @@
3636
from exasol.slc.tool.options.flavor_options import flavor_options
3737
from exasol.slc.tool.options.goal_options import release_options
3838
from exasol.slc.tool.options.test_container_options import test_container_options
39+
from exasol.slc.tool.options.test_environment_options import docker_db_options
3940

4041

4142
@cli.command(short_help="Runs integration tests.")
@@ -152,6 +153,12 @@
152153
default=defaultAccelerator().value,
153154
help=f"""Accelerator to be enabled for tests in docker-db. Possible values: {acceleratorValues()}""",
154155
)
156+
@click.option(
157+
"--external-exasol-bucketfs-https-port",
158+
type=int,
159+
default=Ports.external.bucketfs_https,
160+
help="""Bucketfs port of external Exasol DB.""",
161+
)
155162
def run_db_test(
156163
flavor_path: tuple[str, ...],
157164
release_goal: tuple[str, ...],
@@ -212,6 +219,7 @@ def run_db_test(
212219
use_job_specific_log_file: bool,
213220
compression_strategy: str,
214221
accelerator: str,
222+
external_exasol_bucketfs_https_port: int,
215223
):
216224
"""
217225
This command runs the integration tests in local docker-db.
@@ -282,6 +290,7 @@ def run_db_test(
282290
compression_strategy=CompressionStrategy[compression_strategy.upper()],
283291
docker_environment_variable=docker_environment_variable,
284292
accelerator=Accelerator[accelerator.upper()],
293+
external_exasol_bucketfs_https_port=external_exasol_bucketfs_https_port,
285294
)
286295
if result.command_line_output_path.exists():
287296
with result.command_line_output_path.open("r") as f:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import click
2+
from exasol_integration_test_docker_environment.cli.options.test_environment_options import (
3+
LATEST_DB_VERSION,
4+
)
5+
from exasol_integration_test_docker_environment.lib.test_environment.parameter.docker_db_test_environment_parameter import (
6+
DbOsAccess,
7+
)
8+
9+
docker_db_options = [
10+
click.option(
11+
"--docker-db-image-version",
12+
type=str,
13+
default=LATEST_DB_VERSION,
14+
show_default=True,
15+
help="""Docker DB Image Version against which the tests should run.""",
16+
),
17+
click.option(
18+
"--docker-db-image-name",
19+
type=str,
20+
default="""exasol/docker-db""",
21+
show_default=True,
22+
help="""Docker DB Image Name against which the tests should run.""",
23+
),
24+
click.option(
25+
"--db-os-access",
26+
type=click.Choice([e.name for e in DbOsAccess]),
27+
metavar="METHOD",
28+
default="""DOCKER_EXEC""",
29+
show_default=True,
30+
help="""How to access file system and command line of the
31+
database operating system. Experimental option, will show no
32+
effect until implementation of feature SSH access is
33+
completed.""",
34+
),
35+
click.option(
36+
"--create-certificates/--no-create-certificates",
37+
default=False,
38+
help="""Creates and injects SSL certificates to the Docker DB container.""",
39+
),
40+
click.option(
41+
"--additional-db-parameter",
42+
"-p",
43+
type=str,
44+
multiple=True,
45+
default=(),
46+
help="""Additional database parameter which will be injected to EXAConf. Value should have format '-param=value'.""",
47+
),
48+
click.option(
49+
"--docker-environment-variable",
50+
type=str,
51+
multiple=True,
52+
default=[],
53+
help="""An environment variable which will be added to the docker-db.
54+
The variable needs to have format "key=value".
55+
For example "HTTPS_PROXY=192.168.1.5".
56+
You can repeat this option to add further environment variables.""",
57+
),
58+
]

0 commit comments

Comments
 (0)