diff --git a/airbyte-ci/connectors/connectors_qa/README.md b/airbyte-ci/connectors/connectors_qa/README.md index cb1e79cd2c9f..e2c93285f133 100644 --- a/airbyte-ci/connectors/connectors_qa/README.md +++ b/airbyte-ci/connectors/connectors_qa/README.md @@ -101,6 +101,9 @@ poe lint ## Changelog +### 1.0.2 +Fix access to connector types: it should be accessed from the `Connector.connector_type` attribute. + ### 1.0.1 * Add `applies_to_connector_types` attribute to `Check` class to specify the connector types that the check applies to. * Make `CheckPublishToPyPiIsEnabled` run on source connectors only. diff --git a/airbyte-ci/connectors/connectors_qa/pyproject.toml b/airbyte-ci/connectors/connectors_qa/pyproject.toml index 8e9068045e32..d76b722a4bb9 100644 --- a/airbyte-ci/connectors/connectors_qa/pyproject.toml +++ b/airbyte-ci/connectors/connectors_qa/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "connectors-qa" -version = "1.0.1" +version = "1.0.2" description = "A package to run QA checks on Airbyte connectors, generate reports and documentation." authors = ["Airbyte "] readme = "README.md" diff --git a/airbyte-ci/connectors/connectors_qa/src/connectors_qa/models.py b/airbyte-ci/connectors/connectors_qa/src/connectors_qa/models.py index 3f1086869adb..db55b1db4a39 100644 --- a/airbyte-ci/connectors/connectors_qa/src/connectors_qa/models.py +++ b/airbyte-ci/connectors/connectors_qa/src/connectors_qa/models.py @@ -147,10 +147,10 @@ def run(self, connector: Connector) -> CheckResult: connector, f"Check does not apply to {connector.language.value} connectors", ) - if connector.type not in self.applies_to_connector_types: + if connector.connector_type not in self.applies_to_connector_types: return self.skip( connector, - f"Check does not apply to {connector.type} connectors", + f"Check does not apply to {connector.connector_type} connectors", ) return self._run(connector) diff --git a/airbyte-ci/connectors/connectors_qa/tests/unit_tests/test_models.py b/airbyte-ci/connectors/connectors_qa/tests/unit_tests/test_models.py index c9f274fa8ba8..410519333185 100644 --- a/airbyte-ci/connectors/connectors_qa/tests/unit_tests/test_models.py +++ b/airbyte-ci/connectors/connectors_qa/tests/unit_tests/test_models.py @@ -53,12 +53,12 @@ def test_skip_when_language_does_not_apply(self, mocker): def test_skip_when_type_does_not_apply(self, mocker): # Arrange - connector = mocker.MagicMock(type="destination") + connector = mocker.MagicMock(connector_type="destination") # Act results = [] for check in ENABLED_CHECKS: - if connector.type not in check.applies_to_connector_types: + if connector.connector_type not in check.applies_to_connector_types: results.append(check.run(connector)) # Assert