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

refactor(destination-weaviate): Replace AirbyteLogger with logging.Logger #38272

Merged
merged 4 commits into from
May 20, 2024
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
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.destinations.vector_db_based.document_processor import DocumentProcessor
from airbyte_cdk.destinations.vector_db_based.embedder import Embedder, create_from_config
Expand Down Expand Up @@ -44,7 +44,7 @@ def write(
)
yield from writer.write(configured_catalog, input_messages)

def check(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> AirbyteConnectionStatus:
def check(self, logger: logging.Logger, config: Mapping[str, Any]) -> AirbyteConnectionStatus:
parsed_config = ConfigModel.parse_obj(config)
self._init_indexer(parsed_config)
checks = [self.embedder.check(), self.indexer.check(), DocumentProcessor.check_config(parsed_config.processing)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data:
connectorSubtype: vectorstore
connectorType: destination
definitionId: 7b7d7a0d-954c-45a0-bcfc-39a634b97736
dockerImageTag: 0.2.17
dockerImageTag: 0.2.18
dockerRepository: airbyte/destination-weaviate
documentationUrl: https://docs.airbyte.com/integrations/destinations/weaviate
githubIssueLabel: destination-weaviate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "airbyte-destination-weaviate"
version = "0.2.17"
version = "0.2.18"
description = "Airbyte destination implementation for Weaviate."
authors = ["Airbyte <contact@airbyte.io>"]
license = "MIT"
Expand All @@ -29,4 +29,4 @@ ruff = "^0.3.2"
mypy = "^1.9.0"

[tool.poetry.scripts]
destination-weaviate = "destination_weaviate.run:run"
destination-weaviate = "destination_weaviate.run:run"
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

import logging
import unittest
from unittest.mock import MagicMock, Mock, patch

from airbyte_cdk import AirbyteLogger
from airbyte_cdk.models import ConnectorSpecification, Status
from destination_weaviate.config import ConfigModel
from destination_weaviate.destination import DestinationWeaviate
Expand All @@ -19,7 +19,7 @@ def setUp(self):
"indexing": {"host": "https://my-cluster.weaviate.network", "auth": {"mode": "no_auth"}},
}
self.config_model = ConfigModel.parse_obj(self.config)
self.logger = AirbyteLogger()
self.logger = logging.getLogger("airbyte")

@patch("destination_weaviate.destination.WeaviateIndexer")
@patch("destination_weaviate.destination.create_from_config")
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/weaviate.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ When using [multi-tenancy](https://weaviate.io/developers/weaviate/manage-data/m

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :--------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
| 0.2.18 | 2024-05-15 | [38272](https://github.com/airbytehq/airbyte/pull/38272) | Replace AirbyteLogger with logging.Logger |
| 0.2.17 | 2024-04-15 | [#37333](https://github.com/airbytehq/airbyte/pull/37333) | Update CDK & pytest version to fix security vulnerabilities. |
| 0.2.16 | 2024-03-22 | [#35911](https://github.com/airbytehq/airbyte/pull/35911) | Fix tests and move to Poetry |
| 0.2.15 | 2023-01-25 | [#34529](https://github.com/airbytehq/airbyte/pull/34529) | Fix tests |
Expand Down
Loading