Skip to content

Commit

Permalink
Add metadata for file secure and bump (airbytehq#25860)
Browse files Browse the repository at this point in the history
* Add metadata for file secure

* Remove -secure during qa checks
bnchrch authored May 6, 2023
1 parent c673b0a commit 6ee6430
Showing 3 changed files with 46 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -9,5 +9,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.3.2
LABEL io.airbyte.version=0.3.3
LABEL io.airbyte.name=airbyte/source-file-secure
21 changes: 21 additions & 0 deletions airbyte-integrations/connectors/source-file-secure/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
data:
allowedHosts:
hosts:
- "*"
connectorSubtype: file
connectorType: source
definitionId: 778daa7c-feaf-4db6-96f3-70fd645acc77
dockerImageTag: 0.3.3
dockerRepository: airbyte/source-file-secure
githubIssueLabel: source-file
icon: file.svg
license: MIT
name: File (CSV, JSON, Excel, Feather, Parquet)
registries:
cloud:
enabled: false # strict encrypt connectors are deployed to Cloud by their non strict encrypt sibling.
oss:
enabled: false # strict encrypt connectors are not used on OSS.
releaseStage: generally_available
supportUrl: https://docs.airbyte.com/integrations/sources/file
metadataSpecVersion: "1.0"
27 changes: 24 additions & 3 deletions tools/ci_connector_ops/ci_connector_ops/qa_checks.py
Original file line number Diff line number Diff line change
@@ -198,14 +198,35 @@ def check_metadata_version_matches_dockerfile_label(connector: Connector) -> boo
]


def remove_strict_encrypt_suffix(connector_technical_name: str) -> str:
"""Remove the strict encrypt suffix from a connector name.
Args:
connector_technical_name (str): the connector name.
Returns:
str: the connector name without the strict encrypt suffix.
"""
strict_encrypt_suffixes = [
"-strict-encrypt",
"-secure",
]

for suffix in strict_encrypt_suffixes:
if connector_technical_name.endswith(suffix):
new_connector_technical_name = connector_technical_name.replace(suffix, "")
print("Checking connector " + new_connector_technical_name + " due to strict-encrypt")
return new_connector_technical_name
return connector_technical_name


def run_qa_checks():
connector_technical_name = sys.argv[1].split("/")[-1]
if not connector_technical_name.startswith("source-") and not connector_technical_name.startswith("destination-"):
print("No QA check to run as this is not a connector.")
sys.exit(0)
if connector_technical_name.endswith("-strict-encrypt"):
connector_technical_name = connector_technical_name.replace("-strict-encrypt", "")
print("Checking connector " + connector_technical_name + " due to strict-encrypt")

connector_technical_name = remove_strict_encrypt_suffix(connector_technical_name)
connector = Connector(connector_technical_name)
print(f"Running QA checks for {connector_technical_name}:{connector.version}")
qa_check_results = {qa_check.__name__: qa_check(connector) for qa_check in QA_CHECKS}

0 comments on commit 6ee6430

Please sign in to comment.