Skip to content

Commit

Permalink
destination-firestore: Replace AirbyteLogger with logging.Logger (#38902
Browse files Browse the repository at this point in the history
)
  • Loading branch information
girarda authored Jun 4, 2024
1 parent c26e8d8 commit e5fc4d4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#


import logging
from typing import Any, Iterable, Mapping

from airbyte_cdk import AirbyteLogger
from airbyte_cdk.destinations import Destination
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, DestinationSyncMode, Status, Type

Expand Down Expand Up @@ -47,7 +47,7 @@ def write(
# ignore other message types for now
continue

def check(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> AirbyteConnectionStatus:
def check(self, logger: logging.Logger, config: Mapping[str, Any]) -> AirbyteConnectionStatus:
"""
Tests if the input configuration can be used to successfully connect to the destination with the needed permissions
e.g: if a provided API token or password can be used to connect and write to the destination.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#

import json
import logging
from typing import Any, Dict, Mapping

import pytest
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.models import (
AirbyteMessage,
AirbyteRecordMessage,
Expand Down Expand Up @@ -63,12 +63,12 @@ def client_fixture(config) -> FirestoreWriter:


def test_check_valid_config(config: Mapping):
outcome = DestinationFirestore().check(AirbyteLogger(), config)
outcome = DestinationFirestore().check(logging.getLogger("airbyte"), config)
assert outcome.status == Status.SUCCEEDED


def test_check_invalid_config():
outcome = DestinationFirestore().check(AirbyteLogger(), {"project_id": "not_a_real_id"})
outcome = DestinationFirestore().check(logging.getLogger("airbyte"), {"project_id": "not_a_real_id"})
assert outcome.status == Status.FAILED


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: 27dc7500-6d1b-40b1-8b07-e2f2aea3c9f4
dockerImageTag: 0.1.2
dockerImageTag: 0.1.3
dockerRepository: airbyte/destination-firestore
githubIssueLabel: destination-firestore
icon: firestore.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.1.2"
version = "0.1.3"
name = "destination-firestore"
description = "Destination implementation for Google Firestore."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/firestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ Each stream will be output into a BigQuery table.

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :----------------------------------------------------- | :---------------------------- |
| 0.1.3 | 2024-06-03 | [38902](https://github.com/airbytehq/airbyte/pull/38902) | Replace AirbyteLogger with logging.Logger |
| 0.1.2 | 2024-05-20 | [38422](https://github.com/airbytehq/airbyte/pull/38422) | [autopull] base image + poetry + up_to_date |
| 0.1.1 | 2021-11-21 | [8158](https://github.com/airbytehq/airbyte/pull/8158) | Publish Destination Firestore |

0 comments on commit e5fc4d4

Please sign in to comment.