diff --git a/airbyte-ci/connectors/pipelines/README.md b/airbyte-ci/connectors/pipelines/README.md index 98114ab545de..dfad8ce9947f 100644 --- a/airbyte-ci/connectors/pipelines/README.md +++ b/airbyte-ci/connectors/pipelines/README.md @@ -843,6 +843,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only | Version | PR | Description | | ------- | ---------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------| +| 4.35.3 | [#45393](https://github.com/airbytehq/airbyte/pull/45393) | Resolve symlinks in `SimpleDockerStep`. | | 4.35.2 | [#45360](https://github.com/airbytehq/airbyte/pull/45360) | Updated dependencies. | | 4.35.1 | [#45160](https://github.com/airbytehq/airbyte/pull/45160) | Remove deps.toml dependency for java connectors. | | 4.35.0 | [#44879](https://github.com/airbytehq/airbyte/pull/44879) | Mount `components.py` when building manifest-only connector image | diff --git a/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/docker.py b/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/docker.py index ce4ec95b2611..191687f0ac19 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/docker.py +++ b/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/docker.py @@ -1,7 +1,7 @@ # # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # - +from pathlib import Path from typing import Dict, List, Optional import dagger @@ -55,13 +55,21 @@ def _mount_paths(self, container: dagger.Container) -> dagger.Container: if path_to_mount.optional and not path_to_mount.get_path().exists(): continue - path_string = str(path_to_mount) - destination_path = f"/{path_string}" - if path_to_mount.is_file: - file_to_load = self.context.get_repo_file(path_string) - container = container.with_mounted_file(destination_path, file_to_load) - else: - container = container.with_mounted_directory(destination_path, self.context.get_repo_dir(path_string)) + if path_to_mount.get_path().is_symlink(): + container = self._mount_path(container, path_to_mount.get_path().readlink()) + + container = self._mount_path(container, path_to_mount.get_path()) + return container + + def _mount_path(self, container: dagger.Container, path: Path) -> dagger.Container: + path_string = str(path) + destination_path = f"/{path_string}" + if path.is_file(): + file_to_load = self.context.get_repo_file(path_string) + container = container.with_mounted_file(destination_path, file_to_load) + else: + dir_to_load = self.context.get_repo_dir(path_string) + container = container.with_mounted_directory(destination_path, dir_to_load) return container async def _install_internal_tools(self, container: dagger.Container) -> dagger.Container: diff --git a/airbyte-ci/connectors/pipelines/pipelines/models/steps.py b/airbyte-ci/connectors/pipelines/pipelines/models/steps.py index e494be43d787..ddb78bee4f1e 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/models/steps.py +++ b/airbyte-ci/connectors/pipelines/pipelines/models/steps.py @@ -62,10 +62,6 @@ def __post_init__(self) -> None: def __str__(self) -> str: return str(self.path) - @property - def is_file(self) -> bool: - return self.get_path().is_file() - @dataclass(kw_only=True, frozen=True) class Result: diff --git a/airbyte-ci/connectors/pipelines/pyproject.toml b/airbyte-ci/connectors/pipelines/pyproject.toml index b6551d8b7423..316462b6f69b 100644 --- a/airbyte-ci/connectors/pipelines/pyproject.toml +++ b/airbyte-ci/connectors/pipelines/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pipelines" -version = "4.35.2" +version = "4.35.3" description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines" authors = ["Airbyte "]