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: fix missing test reports #35039

Merged
merged 3 commits into from
Feb 8, 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
4 changes: 2 additions & 2 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ E.G.: running Poe tasks on the modified internal packages of the current branch:

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| 4.1.3 | [#TBD](https://github.com/airbytehq/airbyte/pull/TBD) | Use `poetry install --no-root` in the builder container. |

| 4.1.4 | [#35039](https://github.com/airbytehq/airbyte/pull/35039) | Fix bug which prevented gradle test reports from being added. |
| 4.1.3 | [#35010](https://github.com/airbytehq/airbyte/pull/35010) | Use `poetry install --no-root` in the builder container. |
| 4.1.2 | [#34945](https://github.com/airbytehq/airbyte/pull/34945) | Only install main dependencies when running poetry install. |
| 4.1.1 | [#34430](https://github.com/airbytehq/airbyte/pull/34430) | Speed up airbyte-ci startup (and airbyte-ci format). |
| 4.1.0 | [#34923](https://github.com/airbytehq/airbyte/pull/34923) | Include gradle test reports in HTML connector test report. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pipelines.airbyte_ci.connectors.context import ConnectorContext
from pipelines.consts import AMAZONCORRETTO_IMAGE
from pipelines.dagger.actions import secrets
from pipelines.hacks import never_fail_exec
from pipelines.helpers.utils import sh_dash_c
from pipelines.models.steps import Step, StepResult

Expand Down Expand Up @@ -189,19 +190,14 @@ async def _run(self, *args: Any, **kwargs: Any) -> StepResult:
gradle_container = gradle_container.with_exec(["yum", "install", "-y", "docker"])

# Run the gradle task that we actually care about.
connector_task = f":airbyte-integrations:connectors:{self.context.connector.technical_name}:{self.gradle_task_name}"
gradle_container = gradle_container.with_exec(
sh_dash_c(
[
# Run the gradle task.
self._get_gradle_command(connector_task, task_options=self.params_as_cli_options),
]
)
)
connector_gradle_task = f":airbyte-integrations:connectors:{self.context.connector.technical_name}:{self.gradle_task_name}"
gradle_command = self._get_gradle_command(connector_gradle_task, task_options=self.params_as_cli_options)
gradle_container = gradle_container.with_(never_fail_exec([gradle_command]))
return await self.get_step_result(gradle_container)

async def get_step_result(self, container: Container) -> StepResult:
step_result = await super().get_step_result(container)
# Decorate with test report, if applicable.
return StepResult(
step=step_result.step,
status=step_result.status,
Expand Down Expand Up @@ -239,7 +235,7 @@ async def _collect_test_report(self, gradle_container: Container) -> Optional[st


MAYBE_STARTS_WITH_XML_TAG = re.compile("^ *<")
ESCAPED_ANSI_COLOR_PATTERN = re.compile(r"\?\[m|\?\[[34][0-9]m")
ESCAPED_ANSI_COLOR_PATTERN = re.compile(r"\?\[0?m|\?\[[34][0-9]m")


def render_junit_xml(testsuites: List[Any]) -> str:
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.1.3"
version = "4.1.4"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down
Loading