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

Fix allowed hosts check #29459

Merged
merged 1 commit into from
Aug 15, 2023
Merged
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: 13 additions & 0 deletions airbyte-ci/connectors/connector_ops/connector_ops/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def download_catalog(catalog_url):
"ql": 400,
}

ALLOWED_HOST_THRESHOLD = {
"ql": 300,
}


class ConnectorInvalidNameError(Exception):
pass
Expand Down Expand Up @@ -346,6 +350,15 @@ def requires_high_test_strictness_level(self) -> bool:
"""
return self.ab_internal_ql >= IMPORTANT_CONNECTOR_THRESHOLDS["ql"]

@property
def requires_allowed_hosts_check(self) -> bool:
"""Check if a connector requires allowed hosts.

Returns:
bool: True if the connector requires allowed hosts, False otherwise.
"""
return self.ab_internal_ql >= ALLOWED_HOST_THRESHOLD["ql"]

@property
def allowed_hosts(self) -> Optional[List[str]]:
return self.metadata.get("allowedHosts") if self.metadata else None
Expand Down