Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
alafanechere committed Jan 4, 2024
1 parent 6f9f16c commit 83c228e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from pipelines.airbyte_ci.connectors.context import ConnectorContext
from pipelines.airbyte_ci.connectors.publish.context import PublishConnectorContext
from pipelines.airbyte_ci.steps.no_op import NoOpStep
from pipelines.consts import DOCKER_CLI_IMAGE, DOCKER_HOST_NAME, DOCKER_HOST_PORT, ContextState
from pipelines.consts import ContextState
from pipelines.dagger.actions.system import docker
from pipelines.helpers.utils import create_and_open_file
from pipelines.models.reports import Report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#

import importlib.util
from importlib.abc import Loader
from importlib import metadata
from importlib.abc import Loader

from dagger import Container
from pipelines.airbyte_ci.connectors.context import ConnectorContext


def get_sdk_version():
def get_sdk_version() -> str:
try:
return metadata.version("dagger-io")
except metadata.PackageNotFoundError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def with_global_dockerd_service(
else:
daemon_config_json = get_daemon_config_json()

dockerd_container = dockerd_container.with_new_file("/etc/docker/daemon.json", daemon_config_json)
dockerd_container = dockerd_container.with_new_file("/etc/docker/daemon.json", contents=daemon_config_json)
if docker_hub_username_secret and docker_hub_password_secret:
# Docker login happens late because there's a cache buster in the docker login command.
dockerd_container = docker_login(dockerd_container, docker_hub_username_secret, docker_hub_password_secret)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def get_dagger_client(self, pipeline_name: Optional[str] = None) -> dagger
assert self._dagger_client, "Error initializing Dagger client"
return self._dagger_client.pipeline(pipeline_name) if pipeline_name else self._dagger_client

def get_log_output(self) -> Union[TextIO, io.FileIO]:
def get_log_output(self) -> TextIO:
# This `show_dagger_logs` flag is likely going to be removed in the future.
# See https://github.com/airbytehq/airbyte/issues/33487
if self.params.get("show_dagger_logs", False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import TYPE_CHECKING

from asyncer import asyncify
from dagger import Client, Container, Directory, File, GitRepository, Secret
from dagger import Client, Directory, File, GitRepository, Secret, Service
from github import PullRequest
from pipelines.consts import CIContext, ContextState
from pipelines.helpers.gcs import sanitize_gcs_credentials
Expand All @@ -35,7 +35,7 @@ class PipelineContext:

_dagger_client: Optional[Client]
_report: Optional[Report | ConnectorReport]
dockerd_service: Optional[Container]
dockerd_service: Optional[Service]
started_at: Optional[datetime]
stopped_at: Optional[datetime]

Expand Down

0 comments on commit 83c228e

Please sign in to comment.