From 5114bb5db96c3b627d2fc21623634ad09b9778fc Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Mon, 14 Oct 2024 09:07:10 -0700 Subject: [PATCH] Chore: Update "airbyte-lib" CLI references with newer PyAirbyte CLI refs (`pyab validate`) (#46696) --- airbyte-ci/connectors/pipelines/README.md | 1 + .../connectors/test/steps/python_connectors.py | 11 +++++++++-- airbyte-ci/connectors/pipelines/pyproject.toml | 2 +- .../tests/test_tests/test_python_connectors.py | 6 +++--- .../connectors/source-appstore-singer/metadata.yaml | 2 +- .../metadata.yaml | 2 +- .../connectors/source-kustomer-singer/metadata.yaml | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/airbyte-ci/connectors/pipelines/README.md b/airbyte-ci/connectors/pipelines/README.md index d7a014854807..5c84cd71f29b 100644 --- a/airbyte-ci/connectors/pipelines/README.md +++ b/airbyte-ci/connectors/pipelines/README.md @@ -851,6 +851,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only | Version | PR | Description | | ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| 4.39.0 | [#46696](https://github.com/airbytehq/airbyte/pull/46696) | Bump PyAirbyte dependency and replace `airbyte-lib-validate-source` CLI command with new `validate` command | | 4.38.0 | [#46380](https://github.com/airbytehq/airbyte/pull/46380) | `connectors up-to-date` now supports manifest-only connectors! | | 4.37.0 | [#46380](https://github.com/airbytehq/airbyte/pull/46380) | Include custom components file handling in manifest-only migrations | | 4.36.2 | [#46278](https://github.com/airbytehq/airbyte/pull/46278) | Fixed a bug in RC rollout and promote not taking `semaphore` | diff --git a/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/python_connectors.py b/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/python_connectors.py index 73f40936e070..ee5b6f15648c 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/python_connectors.py +++ b/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/connectors/test/steps/python_connectors.py @@ -23,7 +23,7 @@ from pipelines.models.steps import STEP_PARAMS, Step, StepResult # Pin the PyAirbyte version to avoid updates from breaking CI -PYAIRBYTE_VERSION = "0.10.2" +PYAIRBYTE_VERSION = "0.18.1" class PytestStep(Step, ABC): @@ -215,7 +215,14 @@ async def _run(self, connector_under_test: Container) -> StepResult: test_environment = await self.install_testing_environment(with_poetry(self.context)) test_execution = test_environment.with_( - hacks.never_fail_exec(["airbyte-lib-validate-source", "--connector-dir", ".", "--validate-install-only"]) + hacks.never_fail_exec( + [ + "pyab", + "validate", + f"--connector={self.context.connector.technical_name}", + "--pip-url='.'", + ] + ) ) return await self.get_step_result(test_execution) diff --git a/airbyte-ci/connectors/pipelines/pyproject.toml b/airbyte-ci/connectors/pipelines/pyproject.toml index d5bf7217d2ca..c438d150a452 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.38.0" +version = "4.39.0" description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines" authors = ["Airbyte "] diff --git a/airbyte-ci/connectors/pipelines/tests/test_tests/test_python_connectors.py b/airbyte-ci/connectors/pipelines/tests/test_tests/test_python_connectors.py index 3ea760904c95..25ff35ec67eb 100644 --- a/airbyte-ci/connectors/pipelines/tests/test_tests/test_python_connectors.py +++ b/airbyte-ci/connectors/pipelines/tests/test_tests/test_python_connectors.py @@ -122,7 +122,7 @@ def incompatible_connector(self): @pytest.fixture def context_for_valid_connector(self, compatible_connector, dagger_client, current_platform): context = ConnectorContext( - pipeline_name="test pyairbyte validation", + pipeline_name="CLI smoke test with PyAirbyte", connector=compatible_connector, git_branch="test", git_revision="test", @@ -138,7 +138,7 @@ def context_for_valid_connector(self, compatible_connector, dagger_client, curre @pytest.fixture def context_for_invalid_connector(self, incompatible_connector, dagger_client, current_platform): context = ConnectorContext( - pipeline_name="test pyairbyte validation", + pipeline_name="CLI smoke test with PyAirbyte", connector=incompatible_connector, git_branch="test", git_revision="test", @@ -155,7 +155,7 @@ async def test__run_validation_success(self, mocker, context_for_valid_connector result = await PyAirbyteValidation(context_for_valid_connector)._run(mocker.MagicMock()) assert isinstance(result, StepResult) assert result.status == StepStatus.SUCCESS - assert "Creating source and validating spec is returned successfully..." in result.stdout + assert "Getting `spec` output from connector..." in result.stdout async def test__run_validation_skip_unpublished_connector( self, diff --git a/airbyte-integrations/connectors/source-appstore-singer/metadata.yaml b/airbyte-integrations/connectors/source-appstore-singer/metadata.yaml index 7bda97e037f0..31f3b4082ce8 100644 --- a/airbyte-integrations/connectors/source-appstore-singer/metadata.yaml +++ b/airbyte-integrations/connectors/source-appstore-singer/metadata.yaml @@ -11,7 +11,7 @@ data: remoteRegistries: pypi: enabled: false - # TODO: Set enabled=true after `airbyte-lib-validate-source` is passing. + # TODO: Set enabled=true after `pyab validate` is passing. packageName: airbyte-source-appstore-singer registryOverrides: cloud: diff --git a/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml b/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml index 95bbfc8737f5..3ad01de8fade 100644 --- a/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml +++ b/airbyte-integrations/connectors/source-google-workspace-admin-reports/metadata.yaml @@ -11,7 +11,7 @@ data: remoteRegistries: pypi: enabled: false - # TODO: Set enabled=true after `airbyte-lib-validate-source` is passing. + # TODO: Set enabled=true after `pyab validate` is passing. packageName: airbyte-source-google-workspace-admin-reports registryOverrides: cloud: diff --git a/airbyte-integrations/connectors/source-kustomer-singer/metadata.yaml b/airbyte-integrations/connectors/source-kustomer-singer/metadata.yaml index 71bb7dca6779..325640384444 100644 --- a/airbyte-integrations/connectors/source-kustomer-singer/metadata.yaml +++ b/airbyte-integrations/connectors/source-kustomer-singer/metadata.yaml @@ -11,7 +11,7 @@ data: remoteRegistries: pypi: enabled: false - # TODO: Set enabled=true after `airbyte-lib-validate-source` is passing. + # TODO: Set enabled=true after `pyab validate` is passing. packageName: airbyte-source-kustomer-singer registryOverrides: cloud: