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: make QA check work on strict-encrypt connectors #35536

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
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ E.G.: running Poe tasks on the modified internal packages of the current branch:

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| 4.3.2 | [#35536](https://github.com/airbytehq/airbyte/pull/35536) | Make QA checks run correctly on `*-strict-encrypt` connectors. |
| 4.3.1 | [#35437](https://github.com/airbytehq/airbyte/pull/35437) | Do not run QA checks on publish, just MetadataValidation. |
| 4.3.0 | [#35438](https://github.com/airbytehq/airbyte/pull/35438) | Optionally disable telemetry with environment variable. |
| 4.2.4 | [#35325](https://github.com/airbytehq/airbyte/pull/35325) | Use `connectors_qa` for QA checks and remove redundant checks. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
from abc import ABC, abstractmethod
from functools import cached_property
from pathlib import Path
from typing import ClassVar, List, Optional

import requests # type: ignore
Expand Down Expand Up @@ -124,16 +125,33 @@ class QaChecks(SimpleDockerStep):
"""

def __init__(self, context: ConnectorContext) -> None:
code_directory = context.connector.code_directory
documentation_file_path = context.connector.documentation_file_path
migration_guide_file_path = context.connector.migration_guide_file_path
icon_path = context.connector.icon_path
technical_name = context.connector.technical_name

# When the connector is strict-encrypt, we should run QA checks on the main one as it's the one whose artifacts gets released
if context.connector.technical_name.endswith("-strict-encrypt"):
technical_name = technical_name.replace("-strict-encrypt", "")
code_directory = Path(str(code_directory).replace("-strict-encrypt", ""))
if documentation_file_path:
documentation_file_path = Path(str(documentation_file_path).replace("-strict-encrypt", ""))
if migration_guide_file_path:
migration_guide_file_path = Path(str(migration_guide_file_path).replace("-strict-encrypt", ""))
if icon_path:
icon_path = Path(str(icon_path).replace("-strict-encrypt", ""))

super().__init__(
title=f"Run QA checks for {context.connector.technical_name}",
title=f"Run QA checks for {technical_name}",
context=context,
paths_to_mount=[
MountPath(context.connector.code_directory),
MountPath(code_directory),
# These paths are optional
# But their absence might make the QA check fail
MountPath(context.connector.documentation_file_path, optional=True),
MountPath(context.connector.migration_guide_file_path, optional=True),
MountPath(context.connector.icon_path, optional=True),
MountPath(documentation_file_path, optional=True),
MountPath(migration_guide_file_path, optional=True),
MountPath(icon_path, optional=True),
],
internal_tools=[
MountPath(INTERNAL_TOOL_PATHS.CONNECTORS_QA.value),
Expand All @@ -146,7 +164,7 @@ def __init__(self, context: ConnectorContext) -> None:
}.items()
if v
},
command=["connectors-qa", "run", f"--name={context.connector.technical_name}"],
command=["connectors-qa", "run", f"--name={technical_name}"],
)


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.3.1"
version = "4.3.2"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <[email protected]>"]

Expand Down
Loading