Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connectors-qa] Remove unrelated docs check #38018

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions airbyte-ci/connectors/connectors_qa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,29 @@ poe type_check
```bash
poe lint
```

## Changelog

### 1.3.2

Removed documentation checks in `MedatadaCheck` since it's already verified in `DocumentationCheck`.

### 1.3.1

Remove requirements on DockerHub credentials to run metadata validation.

### 1.3.0

Added `CheckConnectorMaxSecondsBetweenMessagesValue` check that verifies presence of `maxSecondsBetweenMessages` value in `metadata.yaml` file for all source certified connectors.
Added `CheckConnectorMaxSecondsBetweenMessagesValue` check that verifies presence of
`maxSecondsBetweenMessages` value in `metadata.yaml` file for all source certified connectors.

### 1.2.0

Added `ValidateBreakingChangesDeadlines` check that verifies the minimal compliance of breaking change rollout deadline.
Added `ValidateBreakingChangesDeadlines` check that verifies the minimal compliance of breaking
change rollout deadline.

### 1.1.0

Introduced the `Check.run_on_released_connectors` flag.

### 1.0.4
Expand All @@ -141,4 +149,5 @@ Fix access to connector types: it should be accessed from the `Connector.connect
- Make `CheckPublishToPyPiIsEnabled` run on source connectors only.

### 1.0.0

Initial release of `connectors-qa` package.
6 changes: 2 additions & 4 deletions airbyte-ci/connectors/connectors_qa/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[tool.poetry]
name = "connectors-qa"
version = "1.3.1"
version = "1.3.2"
description = "A package to run QA checks on Airbyte connectors, generate reports and documentation."
authors = ["Airbyte <contact@airbyte.io>"]
readme = "README.md"
packages = [
{ include = "connectors_qa", from = "src" },
]
packages = [{ include = "connectors_qa", from = "src" }]
[tool.poetry.dependencies]
python = "^3.10"
airbyte-connectors-base-images = { path = "../base_images", develop = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class ValidateMetadata(MetadataCheck):
description = f"Connectors must have a `{consts.METADATA_FILE_NAME}` file at the root of their directory. This file is used to build our connector registry. Its structure must follow our metadata schema. Field values are also validated. This is to ensure that all connectors have the required metadata fields and that the metadata is valid. More details in this [documentation]({consts.METADATA_DOCUMENTATION_URL})."

def _run(self, connector: Connector) -> CheckResult:
if not connector.documentation_file_path or not connector.documentation_file_path.exists():
return self.fail(
connector=connector,
message="User facing documentation file is missing. Please create it",
)
deserialized_metadata, error = validate_and_load(
connector.metadata_file_path,
PRE_UPLOAD_VALIDATORS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,6 @@

class TestValidateMetadata:

def test_fail_when_documentation_file_path_is_none(self, mocker):
# Arrange
connector = mocker.MagicMock(documentation_file_path=None)

# Act
result = metadata.ValidateMetadata()._run(connector)

# Assert
assert result.status == CheckStatus.FAILED
assert result.message == "User facing documentation file is missing. Please create it"

def test_fail_when_documentation_file_path_does_not_exist(self, mocker, tmp_path):
# Arrange

connector = mocker.MagicMock(documentation_file_path=tmp_path / "doc.md")

# Act
result = metadata.ValidateMetadata()._run(connector)

# Assert
assert result.status == CheckStatus.FAILED
assert result.message == "User facing documentation file is missing. Please create it"

def test_fail_when_deserialization_fails(self, mocker, tmp_path):
# Arrange
mocker.patch.object(metadata, "validate_and_load", return_value=(None, "error"))
Expand Down Expand Up @@ -209,7 +186,7 @@ def test_fail_when_field_missing(self, mocker):
def test_pass_when_field_present(self, mocker):
# Arrange
connector = mocker.MagicMock(metadata={"supportLevel": "certified", "maxSecondsBetweenMessages": 1})

# Act
result = metadata.CheckConnectorMaxSecondsBetweenMessagesValue()._run(connector)

Expand Down
Loading