Skip to content

Commit

Permalink
#73 Handle old style ITDE exceptions (#74)
Browse files Browse the repository at this point in the history
* #73 handle old style itde exceptions

* Apply suggestions from code review

Co-authored-by: Torsten Kilias <[email protected]>

---------

Co-authored-by: Torsten Kilias <[email protected]>
ahsimb and tkilias authored Nov 1, 2024
1 parent a341378 commit 2badbfe
Showing 7 changed files with 111 additions and 89 deletions.
2 changes: 2 additions & 0 deletions pytest-slc/doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
* [0.1.0](changes_0.1.0.md)
* [0.2.0](changes_0.2.0.md)
* [0.3.0](changes_0.3.0.md)
* [0.3.1](changes_0.3.1.md)

<!--- This MyST Parser Sphinx directive is necessary to keep Sphinx happy. We need list here all release letters again, because release droid and other scripts assume Markdown --->
```{toctree}
@@ -14,5 +15,6 @@ unreleased
changes_0.1.0
changes_0.2.0
changes_0.3.0
changes_0.3.1
```
14 changes: 14 additions & 0 deletions pytest-slc/doc/changes/changes_0.3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 0.3.1 - 2024-11-01

## Summary

Relocked the dependencies and fixed the deficiencies of the 0.3.0

## Documentation

* #51: Corrected docstring of fixture `export_slc_async`

## Refactorings

* Relock dependencies
* #73: Added handling the old style ITDE TaskRuntimeError
8 changes: 0 additions & 8 deletions pytest-slc/doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
# Unreleased

## Documentation

* #51: Corrected docstring of fixture `export_slc_async`

## Refactorings

* Relock dependencies
16 changes: 13 additions & 3 deletions pytest-slc/exasol/pytest_slc/__init__.py
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
from exasol.python_extension_common.deployment.language_container_deployer import (
LanguageContainerDeployer, LanguageActivationLevel)
from exasol.python_extension_common.deployment.language_container_builder import LanguageContainerBuilder
from exasol_integration_test_docker_environment.lib.api.api_errors import TaskFailures, TaskRuntimeError

BFS_CONTAINER_DIRECTORY = 'container'

@@ -60,9 +61,18 @@ def export_slc(slc_builder, export_slc_async) -> Path | None:
# Perhaps none of the backends is enabled.
return None

export_result = export_slc_async.get_output()
export_info = export_result.export_infos[str(slc_builder.flavor_path)]["release"]
return Path(export_info.cache_file)
try:
export_result = export_slc_async.get_output()
export_info = export_result.export_infos[str(slc_builder.flavor_path)]["release"]
return Path(export_info.cache_file)
except TaskRuntimeError as ex:
if isinstance(ex.__cause__, TaskFailures) or not ex.inner:
raise
else:
# Handle the old way of error reporting
failures = '\n'.join(ex.inner)
err_message = f'SLC export ended with the following task failures:\n{failures}'
raise RuntimeError(err_message) from ex


@pytest.fixture(scope='session')
2 changes: 1 addition & 1 deletion pytest-slc/exasol/pytest_slc/version.py
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
MAJOR = 0
MINOR = 3
PATCH = 0
PATCH = 1
VERSION = f"{MAJOR}.{MINOR}.{PATCH}"
150 changes: 77 additions & 73 deletions pytest-slc/poetry.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pytest-slc/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytest-exasol-slc"
version = "0.3.0"
version = "0.3.1"
description = ""
authors = ["Mikhail Beck <[email protected]>"]
readme = "README.md"
@@ -9,9 +9,9 @@ packages = [{include = "exasol"}]
[tool.poetry.dependencies]
python = ">=3.10,<4"
pytest = ">=7,<9"
pytest-exasol-backend = ">=0.3.0"
pytest-exasol-extension = ">=0.1.0"
exasol-python-extension-common = ">=0.5.0"
pytest-exasol-backend = ">=0.3.1, <1.0.0"
pytest-exasol-extension = ">=0.2.1, <1.0.0"
exasol-python-extension-common = ">=0.8.0, <1.0.0"

[tool.poetry.plugins.pytest11]
slc = "exasol.pytest_slc"

0 comments on commit 2badbfe

Please sign in to comment.