Skip to content

Commit 5dbce81

Browse files
Marius Postaalafanechere
Marius Posta
andauthored
airbyte-ci: improve QA checks for airbyte-enterprise (#45393)
Co-authored-by: Augustin <[email protected]>
1 parent a135236 commit 5dbce81

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

airbyte-ci/connectors/pipelines/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only
843843

844844
| Version | PR | Description |
845845
| ------- | ---------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------|
846+
| 4.35.3 | [#45393](https://github.com/airbytehq/airbyte/pull/45393) | Resolve symlinks in `SimpleDockerStep`. |
846847
| 4.35.2 | [#45360](https://github.com/airbytehq/airbyte/pull/45360) | Updated dependencies. |
847848
| 4.35.1 | [#45160](https://github.com/airbytehq/airbyte/pull/45160) | Remove deps.toml dependency for java connectors. |
848849
| 4.35.0 | [#44879](https://github.com/airbytehq/airbyte/pull/44879) | Mount `components.py` when building manifest-only connector image |

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/steps/docker.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
33
#
4-
4+
from pathlib import Path
55
from typing import Dict, List, Optional
66

77
import dagger
@@ -55,13 +55,21 @@ def _mount_paths(self, container: dagger.Container) -> dagger.Container:
5555
if path_to_mount.optional and not path_to_mount.get_path().exists():
5656
continue
5757

58-
path_string = str(path_to_mount)
59-
destination_path = f"/{path_string}"
60-
if path_to_mount.is_file:
61-
file_to_load = self.context.get_repo_file(path_string)
62-
container = container.with_mounted_file(destination_path, file_to_load)
63-
else:
64-
container = container.with_mounted_directory(destination_path, self.context.get_repo_dir(path_string))
58+
if path_to_mount.get_path().is_symlink():
59+
container = self._mount_path(container, path_to_mount.get_path().readlink())
60+
61+
container = self._mount_path(container, path_to_mount.get_path())
62+
return container
63+
64+
def _mount_path(self, container: dagger.Container, path: Path) -> dagger.Container:
65+
path_string = str(path)
66+
destination_path = f"/{path_string}"
67+
if path.is_file():
68+
file_to_load = self.context.get_repo_file(path_string)
69+
container = container.with_mounted_file(destination_path, file_to_load)
70+
else:
71+
dir_to_load = self.context.get_repo_dir(path_string)
72+
container = container.with_mounted_directory(destination_path, dir_to_load)
6573
return container
6674

6775
async def _install_internal_tools(self, container: dagger.Container) -> dagger.Container:

airbyte-ci/connectors/pipelines/pipelines/models/steps.py

-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ def __post_init__(self) -> None:
6262
def __str__(self) -> str:
6363
return str(self.path)
6464

65-
@property
66-
def is_file(self) -> bool:
67-
return self.get_path().is_file()
68-
6965

7066
@dataclass(kw_only=True, frozen=True)
7167
class Result:

airbyte-ci/connectors/pipelines/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pipelines"
7-
version = "4.35.2"
7+
version = "4.35.3"
88
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
99
authors = ["Airbyte <[email protected]>"]
1010

0 commit comments

Comments
 (0)