Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbyte-ci: improve error handling in live tests #44118

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,9 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only
## Changelog

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| 4.32.2 | [#43970](https://github.com/airbytehq/airbyte/pull/43970) | Make `connectors publish` early exit if no connectors are selected. |
|---------| ---------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------|
| 4.32.3 | [#44118](https://github.com/airbytehq/airbyte/pull/44118) | Improve error handling in live tests. |
| 4.32.2 | [#43970](https://github.com/airbytehq/airbyte/pull/43970) | Make `connectors publish` early exit if no connectors are selected. |
| 4.32.1 | [#41642](https://github.com/airbytehq/airbyte/pull/41642) | Avoid transient publish failures by increasing `POETRY_REQUESTS_TIMEOUT` and setting retries on `PublishToPythonRegistry`. |
| 4.32.0 | [#43969](https://github.com/airbytehq/airbyte/pull/43969) | Add an `--ignore-connector` option to `up-to-date` |
| 4.31.5 | [#43934](https://github.com/airbytehq/airbyte/pull/43934) | Track deleted files when generating pull-request |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from textwrap import dedent
from typing import Any, ClassVar, Dict, List, Optional, Set

import dagger
import requests # type: ignore
import semver
import yaml # type: ignore
Expand Down Expand Up @@ -649,18 +650,25 @@ async def _run(self, connector_under_test_container: Container) -> StepResult:

exit_code, stdout, stderr = await get_exec_result(container)

if (
f"session_{self.run_id}" not in await container.directory(f"{tests_artifacts_dir}").entries()
or "report.html" not in await container.directory(f"{tests_artifacts_dir}/session_{self.run_id}").entries()
):
try:
if (
f"session_{self.run_id}" not in await container.directory(f"{tests_artifacts_dir}").entries()
or "report.html" not in await container.directory(f"{tests_artifacts_dir}/session_{self.run_id}").entries()
):
main_logger.exception(
"The report file was not generated, an unhandled error likely happened during regression test execution, please check the step stderr and stdout for more details"
)
regression_test_report = None
else:
await container.file(path_to_report).export(path_to_report)
with open(path_to_report, "r") as fp:
regression_test_report = fp.read()
except dagger.QueryError as exc:
regression_test_report = None
main_logger.exception(
"The report file was not generated, an unhandled error likely happened during regression test execution, please check the step stderr and stdout for more details"
"The test artifacts directory was not generated, an unhandled error likely happened during setup, please check the step stderr and stdout for more details",
exc_info=exc,
)
regression_test_report = None
else:
await container.file(path_to_report).export(path_to_report)
with open(path_to_report, "r") as fp:
regression_test_report = fp.read()

return StepResult(
step=self,
Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "4.32.2"
version = "4.32.3"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down
Loading