Skip to content

Commit

Permalink
Replace AirbyteLogger with logging.Logger
Browse files Browse the repository at this point in the history
  • Loading branch information
girarda committed May 16, 2024
1 parent ffc613e commit a66355a
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.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 @@ -37,7 +37,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 @@ -22,7 +22,7 @@ data:
connectorSubtype: vectorstore
connectorType: destination
definitionId: 65de8962-48c9-11ee-be56-0242ac120002
dockerImageTag: 0.0.14
dockerImageTag: 0.0.15
dockerRepository: airbyte/destination-milvus
githubIssueLabel: destination-milvus
icon: milvus.svg
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-milvus"
version = "0.0.14"
version = "0.0.15"
description = "Airbyte destination implementation for Milvus."
authors = ["Airbyte <[email protected]>"]
license = "MIT"
Expand All @@ -18,7 +18,7 @@ include = "destination_milvus"

[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = {version = "0.81.6", extras = ["vector-db-based"]}
airbyte-cdk = {version = "0.0.15"]}
pymilvus = "2.3.0"

[tool.poetry.group.dev.dependencies]
Expand Down
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_milvus.config import ConfigModel
from destination_milvus.destination import DestinationMilvus
Expand All @@ -28,7 +28,7 @@ def setUp(self):
},
}
self.config_model = ConfigModel.parse_obj(self.config)
self.logger = AirbyteLogger()
self.logger = logging.getLogger("airbyte")

@patch("destination_milvus.destination.MilvusIndexer")
@patch("destination_milvus.destination.create_from_config")
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/destinations/milvus.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ vector_store.similarity_search("test")

| Version | Date | Pull Request | Subject |
| :------ | :--------- | :-------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0.0.15 | 2024-05-15 | [0](https://github.com/airbytehq/airbyte/pull/0) | Replace AirbyteLogger with logging.Logger |
| 0.0.14 | 2024-3-22 | [#37333](https://github.com/airbytehq/airbyte/pull/37333) | Update CDK & pytest version to fix security vulnerabilities |
| 0.0.13 | 2024-3-22 | [#35911](https://github.com/airbytehq/airbyte/pull/35911) | Move to poetry; Fix tests |
| 0.0.12 | 2023-12-11 | [#33303](https://github.com/airbytehq/airbyte/pull/33303) | Fix bug with embedding special tokens |
Expand Down

0 comments on commit a66355a

Please sign in to comment.