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

chore(airbyte-ci): move common_utils into ci_credentials #52643

Merged
merged 17 commits into from
Jan 31, 2025
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
1 change: 0 additions & 1 deletion .github/workflows/airbyte-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
internal_poetry_packages:
- airbyte-ci/connectors/pipelines/**
- airbyte-ci/connectors/base_images/**
- airbyte-ci/connectors/common_utils/**
- airbyte-ci/connectors/connectors_insights/**
- airbyte-ci/connectors/connector_ops/**
- airbyte-ci/connectors/connectors_qa/**
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/connector_teams_review_requirements.yml

This file was deleted.

2,371 changes: 1,265 additions & 1,106 deletions airbyte-ci/connectors/base_images/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion airbyte-ci/connectors/base_images/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "airbyte-connectors-base-images"
version = "1.5.1"
version = "1.5.2"
description = "This package is used to generate and publish the base images for Airbyte Connectors."
authors = ["Augustin Lafanechere <[email protected]>"]
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class Logger:
"""

def __init__(self):
formatter = MyFormatter(fmt="[%(asctime)s] - %(levelname)-6s - %(message)s", datefmt="%d/%m/%Y %H:%M:%S.%f")
formatter = MyFormatter(fmt="[%(asctime)s] - %(levelname)s - %(message)s", datefmt="%d/%m/%Y %H:%M:%S.%f")

logger_name = __name__
stack_items = inspect.stack()
for i in range(len(stack_items)):
if stack_items[i].filename.endswith("common_utils/logger.py"):
if stack_items[i].filename.endswith("ci_credentials/logger.py"):
logger_name = ".".join(stack_items[i + 1].filename.split("/")[-3:])[:-3]

self._logger = logging.getLogger(logger_name)
Expand All @@ -56,17 +56,17 @@ def wrapper(*args):
prefix = ""
stack_items = inspect.stack()
for i in range(len(stack_items)):
if stack_items[i].filename.endswith("common_utils/logger.py"):
if stack_items[i].filename.endswith("ci_credentials/logger.py"):
filepath = stack_items[i + 1].filename
line_number = stack_items[i + 1].lineno

# show last 3 path items only
filepath = "/".join(filepath.split("/")[-3:])
prefix = f"[{filepath}:{line_number}]"
prefix = f"[{filepath}:{line_number}] # "
break
if prefix:
args = list(args)
args[0] = f"{prefix} # {args[0]}"
args[0] = f"{prefix}{args[0]}"
func(*args)
if func_name == "critical":
sys.exit(1)
Expand Down
4 changes: 2 additions & 2 deletions airbyte-ci/connectors/ci_credentials/ci_credentials/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from json.decoder import JSONDecodeError

import click
from common_utils import Logger

from . import SecretsManager
from .logger import Logger
from .secrets_manager import SecretsManager


logger = Logger()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

import requests
import yaml
from common_utils import GoogleApi, Logger

from .google_api import GoogleApi
from .logger import Logger
from .models import DEFAULT_SECRET_FILE, RemoteSecret, Secret


Expand Down
Loading
Loading