diff --git a/airbyte-ci/connectors/metadata_service/lib/metadata_service/validators/metadata_validator.py b/airbyte-ci/connectors/metadata_service/lib/metadata_service/validators/metadata_validator.py index 8c71c394a750..5941033142cd 100644 --- a/airbyte-ci/connectors/metadata_service/lib/metadata_service/validators/metadata_validator.py +++ b/airbyte-ci/connectors/metadata_service/lib/metadata_service/validators/metadata_validator.py @@ -23,6 +23,8 @@ class ValidatorOptions: ValidationResult = Tuple[bool, Optional[Union[ValidationError, str]]] Validator = Callable[[ConnectorMetadataDefinitionV0, ValidatorOptions], ValidationResult] +_SOURCE_DECLARATIVE_MANIFEST_DEFINITION_ID = "64a2f99c-542f-4af8-9a6f-355f1217b436" + def validate_metadata_images_in_dockerhub( metadata_definition: ConnectorMetadataDefinitionV0, validator_opts: ValidatorOptions @@ -102,6 +104,13 @@ def validate_major_version_bump_has_breaking_change_entry( if not is_major_version(image_tag): return True, None + # We are updating the same version since connector builder projects have a different concept of + # versioning. + # We do not check for breaking changes for source-declarative-connector in the metadata because the conenctor isn't directly used by any workspace. + # Breaking changes are instead tracked at the CDK level + if str(metadata_definition.data.definitionId) == _SOURCE_DECLARATIVE_MANIFEST_DEFINITION_ID: + return True, None + docker_repo = get(metadata_definition_dict, "data.dockerRepository") releases = get(metadata_definition_dict, "data.releases") if not releases: diff --git a/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/invalid/metadata_major_bump_no_breaking_changes.yaml b/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/invalid/metadata_major_bump_no_breaking_changes.yaml new file mode 100644 index 000000000000..9d26a7480bed --- /dev/null +++ b/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/invalid/metadata_major_bump_no_breaking_changes.yaml @@ -0,0 +1,14 @@ +metadataSpecVersion: 1.0 +data: + name: Low-code + definitionId: 1fa90628-2b9e-11ed-a261-0242ac120002 + connectorType: source + dockerRepository: airbyte/image-exists-1 + githubIssueLabel: source-alloydb-strict-encrypt + dockerImageTag: 1.0.0 + documentationUrl: https://docs.airbyte.com/integrations/sources/existingsource + connectorSubtype: database + releaseStage: generally_available + license: MIT + tags: + - language:java diff --git a/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/valid/metadata_declarative_manifest_major_bump_no_breaking_change.yaml b/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/valid/metadata_declarative_manifest_major_bump_no_breaking_change.yaml new file mode 100644 index 000000000000..cde8a6cedd85 --- /dev/null +++ b/airbyte-ci/connectors/metadata_service/lib/tests/fixtures/metadata_validate/valid/metadata_declarative_manifest_major_bump_no_breaking_change.yaml @@ -0,0 +1,14 @@ +metadataSpecVersion: 1.0 +data: + name: Low-code + definitionId: 64a2f99c-542f-4af8-9a6f-355f1217b436 + connectorType: source + dockerRepository: airbyte/image-exists-1 + githubIssueLabel: source-alloydb-strict-encrypt + dockerImageTag: 1.0.0 + documentationUrl: https://docs.airbyte.com/integrations/sources/existingsource + connectorSubtype: database + releaseStage: generally_available + license: MIT + tags: + - language:java