From dd112eeefeafa39bdcb5c0f0d59fceca9d0c17b9 Mon Sep 17 00:00:00 2001 From: Augustin Date: Thu, 8 Feb 2024 09:55:15 +0100 Subject: [PATCH] airbyte-ci: only install main dependencies when calling poetry install (#34945) --- airbyte-ci/connectors/pipelines/README.md | 5 +++-- .../pipelines/pipelines/dagger/actions/python/common.py | 9 +++++---- airbyte-ci/connectors/pipelines/pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/airbyte-ci/connectors/pipelines/README.md b/airbyte-ci/connectors/pipelines/README.md index e3a4617038ddc8..b3910ef9ee21f1 100644 --- a/airbyte-ci/connectors/pipelines/README.md +++ b/airbyte-ci/connectors/pipelines/README.md @@ -289,14 +289,14 @@ flowchart TD #### Options | Option | Multiple | Default value | Description | -| ------------------------------------------------------- | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| ------------------------------------------------------- | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--skip-step/-x` | True | | Skip steps by id e.g. `-x unit -x acceptance` | | `--only-step/-k` | True | | Only run specific steps by id e.g. `-k unit -k acceptance` | | `--fail-fast` | False | False | Abort after any tests fail, rather than continuing to run additional tests. Use this setting to confirm a known bug is fixed (or not), or when you only require a pass/fail result. | | `--code-tests-only` | True | False | Skip any tests not directly related to code updates. For instance, metadata checks, version bump checks, changelog verification, etc. Use this setting to help focus on code quality during development. | | `--concurrent-cat` | False | False | Make CAT tests run concurrently using pytest-xdist. Be careful about source or destination API rate limits. | | `--.=` | True | | You can pass extra parameters for specific test steps. More details in the extra parameters section below | -| `--ci-requirements` | False | | | Output the CI requirements as a JSON payload. It is used to determine the CI runner to use. | +| `--ci-requirements` | False | | | Output the CI requirements as a JSON payload. It is used to determine the CI runner to use. Note: @@ -640,6 +640,7 @@ E.G.: running Poe tasks on the modified internal packages of the current branch: | Version | PR | Description | | ------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| 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. | | 4.0.0 | [#34736](https://github.com/airbytehq/airbyte/pull/34736) | Run poe tasks declared in internal poetry packages. | diff --git a/airbyte-ci/connectors/pipelines/pipelines/dagger/actions/python/common.py b/airbyte-ci/connectors/pipelines/pipelines/dagger/actions/python/common.py index 741de252ae676f..430cb23f173c72 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/dagger/actions/python/common.py +++ b/airbyte-ci/connectors/pipelines/pipelines/dagger/actions/python/common.py @@ -159,12 +159,13 @@ def _install_python_dependencies_from_poetry( ) -> Container: pip_install_poetry_cmd = ["pip", "install", "poetry"] poetry_disable_virtual_env_cmd = ["poetry", "config", "virtualenvs.create", "false"] - poetry_install_no_venv_cmd = ["poetry", "install"] + poetry_install_cmd = ["poetry", "install"] if additional_dependency_groups: for group in additional_dependency_groups: - poetry_install_no_venv_cmd += ["--with", group] - - return container.with_exec(pip_install_poetry_cmd).with_exec(poetry_disable_virtual_env_cmd).with_exec(poetry_install_no_venv_cmd) + poetry_install_cmd += ["--with", group] + else: + poetry_install_cmd += ["--only", "main"] + return container.with_exec(pip_install_poetry_cmd).with_exec(poetry_disable_virtual_env_cmd).with_exec(poetry_install_cmd) async def with_installed_python_package( diff --git a/airbyte-ci/connectors/pipelines/pyproject.toml b/airbyte-ci/connectors/pipelines/pyproject.toml index b6df0ebc1436ce..8016bdc146e117 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.1.1" +version = "4.1.2" description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines" authors = ["Airbyte "]