-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
254 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 20 additions & 6 deletions
26
tools/ci_connector_ops/ci_connector_ops/qa_engine/constants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
# | ||
import os | ||
|
||
CONNECTOR_BUILD_OUTPUT_URL = "https://dnsgjos7lj2fu.cloudfront.net/tests/history/connectors" | ||
CLOUD_CATALOG_URL = "https://storage.googleapis.com/prod-airbyte-cloud-connector-metadata-service/cloud_catalog.json" | ||
OSS_CATALOG_URL = "https://storage.googleapis.com/prod-airbyte-cloud-connector-metadata-service/oss_catalog.json" | ||
|
||
INAPPROPRIATE_FOR_CLOUD_USE_CONNECTORS = [ | ||
"8be1cf83-fde1-477f-a4ad-318d23c9f3c6", # Local CSV | ||
"a625d593-bba5-4a1c-a53d-2d246268a816", # Local JSON | ||
"b76be0a6-27dc-4560-95f6-2623da0bd7b6" # Local SQL Lite | ||
"8be1cf83-fde1-477f-a4ad-318d23c9f3c6", # Local CSV | ||
"a625d593-bba5-4a1c-a53d-2d246268a816", # Local JSON | ||
"b76be0a6-27dc-4560-95f6-2623da0bd7b6", # Local SQL Lite | ||
] | ||
|
||
GCS_QA_REPORT_PATH = "gs://prod-airbyte-cloud-connector-metadata-service/qa_report.json" | ||
AIRBYTE_CLOUD_GITHUB_REPO_URL = "https://github.com/airbytehq/airbyte-cloud.git" | ||
AIRBYTE_CLOUD_MAIN_BRANCH_NAME = "master" | ||
AIRBYTE_PLATFORM_INTERNAL_REPO_OWNER = "airbytehq" | ||
AIRBYTE_PLATFORM_INTERNAL_REPO_NAME = "airbyte-platform-internal" | ||
AIRBYTE_PLATFORM_INTERNAL_GITHUB_REPO_URL = ( | ||
f"https://github.com/{AIRBYTE_PLATFORM_INTERNAL_REPO_OWNER}/{AIRBYTE_PLATFORM_INTERNAL_REPO_NAME}.git" | ||
) | ||
AIRBYTE_PLATFORM_INTERNAL_MAIN_BRANCH_NAME = "master" | ||
AIRBYTE_PLATFORM_INTERNAL_PR_ENDPOINT = ( | ||
f"https://api.github.com/repos/{AIRBYTE_PLATFORM_INTERNAL_REPO_OWNER}/{AIRBYTE_PLATFORM_INTERNAL_REPO_NAME}/pulls" | ||
) | ||
GITHUB_API_TOKEN = os.environ.get("GITHUB_API_TOKEN") | ||
GITHUB_API_COMMON_HEADERS = { | ||
"Accept": "application/vnd.github+json", | ||
"X-GitHub-Api-Version": "2022-11-28", | ||
"Authorization": f"Bearer {GITHUB_API_TOKEN}", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import logging | ||
|
||
from . import cloud_availability_updater, enrichments, inputs, validations | ||
from .constants import CLOUD_CATALOG_URL, OSS_CATALOG_URL | ||
from . import enrichments, inputs, validations | ||
|
||
logging.basicConfig(level=logging.INFO) | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def main(): | ||
logger.info("Fetch the OSS connectors catalog.") | ||
oss_catalog = inputs.fetch_remote_catalog(OSS_CATALOG_URL) | ||
logger.info("Fetch the Cloud connectors catalog.") | ||
cloud_catalog = inputs.fetch_remote_catalog(CLOUD_CATALOG_URL) | ||
logger.info("Fetch adoption metrics.") | ||
adoption_metrics_per_connector_version = inputs.fetch_adoption_metrics_per_connector_version() | ||
enriched_catalog = enrichments.get_enriched_catalog( | ||
oss_catalog, | ||
cloud_catalog, | ||
adoption_metrics_per_connector_version | ||
) | ||
validations.get_qa_report(enriched_catalog, len(oss_catalog)) | ||
logger.info("Start the enriched catalog generation.") | ||
enriched_catalog = enrichments.get_enriched_catalog(oss_catalog, cloud_catalog, adoption_metrics_per_connector_version) | ||
logger.info("Start the QA report generation.") | ||
qa_report = validations.get_qa_report(enriched_catalog, len(oss_catalog)) | ||
logger.info("Start the QA report generation.") | ||
eligible_connectors = validations.get_connectors_eligible_for_cloud(qa_report) | ||
logger.info("Start eligible connectors deployment to Cloud.") | ||
cloud_availability_updater.deploy_eligible_connectors_to_cloud_repo(eligible_connectors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.