Skip to content

Commit 936d679

Browse files
committed
airbyte ci test to support --extras
1 parent d02103c commit 936d679

File tree

12 files changed

+17
-11
lines changed

12 files changed

+17
-11
lines changed

.github/workflows/airbyte-ci-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
with:
3131
# Note: expressions within a filter are OR'ed
3232
filters: |
33+
# This list is duplicated in `pipelines/airbyte_ci/test/__init__.py`
3334
internal_poetry_packages:
3435
- airbyte-lib/**
3536
- airbyte-ci/connectors/pipelines/**

airbyte-ci/connectors/base_images/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ publish = "base_images.commands:publish_existing_version"
3636
test = "pytest tests"
3737

3838
[tool.airbyte_ci]
39-
extra_poetry_groups = ["dev"]
39+
optional_poetry_groups = ["dev"]
4040
poe_tasks = ["test"]
4141
mount_docker_socket = true

airbyte-ci/connectors/ci_credentials/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ci_credentials = "ci_credentials.main:ci_credentials"
3232
test = "pytest tests"
3333

3434
[tool.airbyte_ci]
35-
extra_poetry_groups = ["dev"]
35+
optional_poetry_groups = ["dev"]
3636
poe_tasks = ["test"]

airbyte-ci/connectors/common_utils/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ build-backend = "poetry.core.masonry.api"
2727
test = "pytest tests"
2828

2929
[tool.airbyte_ci]
30-
extra_poetry_groups = ["dev"]
30+
optional_poetry_groups = ["dev"]
3131
# Disable poe tasks as tests are not passing ATM
3232
poe_tasks = []

airbyte-ci/connectors/connector_ops/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ allowed-hosts-checks = "connector_ops.allowed_hosts_checks:check_allowed_hosts"
3838
test = "pytest tests"
3939

4040
[tool.airbyte_ci]
41-
extra_poetry_groups = ["dev"]
41+
optional_poetry_groups = ["dev"]
4242
poe_tasks = ["test"]

airbyte-ci/connectors/connectors_qa/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ type_check = "mypy src --disallow-untyped-defs"
4040
lint = "ruff check src"
4141

4242
[tool.airbyte_ci]
43-
extra_poetry_groups = ["dev"]
43+
optional_poetry_groups = ["dev"]
4444
poe_tasks = ["type_check", "lint", "test"]
4545
required_environment_variables = ["DOCKER_HUB_USERNAME", "DOCKER_HUB_PASSWORD",]

airbyte-ci/connectors/metadata_service/lib/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ promote-connector-to-latest = "gsutil -m rsync -r -d gs://$TARGET_BUCKET/metada
3636
test = "pytest tests"
3737

3838
[tool.airbyte_ci]
39-
extra_poetry_groups = ["dev"]
39+
optional_poetry_groups = ["dev"]
4040
poe_tasks = ["test"]
4141

4242
[build-system]

airbyte-ci/connectors/metadata_service/orchestrator/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ module_name = "orchestrator"
4949
test = "pytest tests"
5050

5151
[tool.airbyte_ci]
52-
extra_poetry_groups = ["dev"]
52+
optional_poetry_groups = ["dev"]
5353
poe_tasks = ["test"]

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/test/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class AirbyteCiPackageConfiguration(BaseModel):
1111
required_environment_variables: Set[str] = Field(
1212
set(), description="List of unique required environment variables to pass to the container running the poe task"
1313
)
14-
extra_poetry_groups: Set[str] = Field(set(), description="List of unique extra poetry groups to install")
14+
poetry_extras: Set[str] = Field(set(), description="List of unique poetry extras to install")
15+
optional_poetry_groups: Set[str] = Field(set(), description="List of unique poetry groups to install")
1516
side_car_docker_engine: bool = Field(
1617
False, description="Flag indicating the use of a sidecar Docker engine during the poe task executions"
1718
)

airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/test/pipeline.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ def prepare_container_for_poe_tasks(
191191
container = container.with_workdir(f"/airbyte/{poetry_package_path}")
192192

193193
# Install the poetry package
194-
container = container.with_exec(["poetry", "install"] + [f"--with={group}" for group in airbyte_ci_package_config.extra_poetry_groups])
194+
container = container.with_exec(
195+
["poetry", "install"]
196+
+ [f"--with={group}" for group in airbyte_ci_package_config.optional_poetry_groups]
197+
+ [f"--extras={extra}" for extra in airbyte_ci_package_config.poetry_extras]
198+
)
195199
return container
196200

197201

airbyte-ci/connectors/pipelines/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ type_check = "mypy pipelines --disallow-untyped-defs"
6262
lint = "ruff check pipelines"
6363

6464
[tool.airbyte_ci]
65-
extra_poetry_groups = ["dev"]
65+
optional_poetry_groups = ["dev"]
6666
poe_tasks = ["type_check", "lint", "test"]
6767
mount_docker_socket = true

airbyte-lib/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ airbyte-lib-validate-source = "airbyte_lib.validate:run"
255255
test = "pytest tests"
256256

257257
[tool.airbyte_ci]
258-
extra_poetry_groups = ["dev"]
258+
optional_poetry_groups = ["dev"]
259259
poe_tasks = ["test"]
260260
required_environment_variables = ["GCP_GSM_CREDENTIALS"]
261261
side_car_docker_engine = true

0 commit comments

Comments
 (0)