From bc090834e0ecc796c23fff4e95913741254b8e96 Mon Sep 17 00:00:00 2001 From: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com> Date: Tue, 1 Nov 2022 23:19:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BDestination=20Google=20Sheets:=20Fi?= =?UTF-8?q?x=20empty=20headers=20list=20(#18729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix empty headers list * Updated PR number * Bumped version * auto-bump connector version Co-authored-by: Octavia Squidington III --- .../init/src/main/resources/seed/destination_definitions.yaml | 2 +- .../init/src/main/resources/seed/destination_specs.yaml | 2 +- .../connectors/destination-google-sheets/Dockerfile | 2 +- .../connectors/destination-google-sheets/README.md | 2 +- .../destination_google_sheets/spreadsheet.py | 3 ++- docs/integrations/destinations/google-sheets.md | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/destination_definitions.yaml b/airbyte-config/init/src/main/resources/seed/destination_definitions.yaml index 3ff0328318f0..0d7af84e48f8 100644 --- a/airbyte-config/init/src/main/resources/seed/destination_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/destination_definitions.yaml @@ -317,7 +317,7 @@ - name: Google Sheets destinationDefinitionId: a4cbd2d1-8dbe-4818-b8bc-b90ad782d12a dockerRepository: airbyte/destination-google-sheets - dockerImageTag: 0.1.1 + dockerImageTag: 0.1.2 documentationUrl: https://docs.airbyte.com/integrations/destinations/google-sheets icon: google-sheets.svg releaseStage: alpha diff --git a/airbyte-config/init/src/main/resources/seed/destination_specs.yaml b/airbyte-config/init/src/main/resources/seed/destination_specs.yaml index b27586cd2f2f..ea31f59258e3 100644 --- a/airbyte-config/init/src/main/resources/seed/destination_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/destination_specs.yaml @@ -6108,7 +6108,7 @@ supported_destination_sync_modes: - "overwrite" - "append" -- dockerImage: "airbyte/destination-google-sheets:0.1.1" +- dockerImage: "airbyte/destination-google-sheets:0.1.2" spec: documentationUrl: "https://docs.airbyte.com/integrations/destinations/google-sheets" connectionSpecification: diff --git a/airbyte-integrations/connectors/destination-google-sheets/Dockerfile b/airbyte-integrations/connectors/destination-google-sheets/Dockerfile index 202dba1a37c0..dcbd96c665b5 100644 --- a/airbyte-integrations/connectors/destination-google-sheets/Dockerfile +++ b/airbyte-integrations/connectors/destination-google-sheets/Dockerfile @@ -13,5 +13,5 @@ RUN pip install . ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.1 +LABEL io.airbyte.version=0.1.2 LABEL io.airbyte.name=airbyte/destination-google-sheets diff --git a/airbyte-integrations/connectors/destination-google-sheets/README.md b/airbyte-integrations/connectors/destination-google-sheets/README.md index 4f5752367415..a39a52d52f30 100644 --- a/airbyte-integrations/connectors/destination-google-sheets/README.md +++ b/airbyte-integrations/connectors/destination-google-sheets/README.md @@ -79,7 +79,7 @@ cat integration_tests/test_data/messages.txt | docker run --rm -v $(pwd)/secrets Make sure to familiarize yourself with [pytest test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery) to know how your test files and methods should be named. First install test dependencies into your virtual environment: ``` -pip install .[tests] +pip install .'[tests]' ``` ### Unit Tests To run unit tests locally, from the connector directory run: diff --git a/airbyte-integrations/connectors/destination-google-sheets/destination_google_sheets/spreadsheet.py b/airbyte-integrations/connectors/destination-google-sheets/destination_google_sheets/spreadsheet.py index cc104973ff16..d496fb77eb80 100644 --- a/airbyte-integrations/connectors/destination-google-sheets/destination_google_sheets/spreadsheet.py +++ b/airbyte-integrations/connectors/destination-google-sheets/destination_google_sheets/spreadsheet.py @@ -46,7 +46,8 @@ def set_headers(self, stream_name: str, headers_list: List[str]): Sets headers belonging to the input stream """ stream: Worksheet = self.open_worksheet(stream_name) - stream.update_row(1, headers_list) + if headers_list: + stream.update_row(1, headers_list) def index_cols(self, stream: Worksheet) -> Mapping[str, int]: """ diff --git a/docs/integrations/destinations/google-sheets.md b/docs/integrations/destinations/google-sheets.md index 1d135ba23d95..ef4c122966ae 100644 --- a/docs/integrations/destinations/google-sheets.md +++ b/docs/integrations/destinations/google-sheets.md @@ -130,5 +130,6 @@ You cannot create more than 200 worksheets within single spreadsheet. | Version | Date | Pull Request | Subject | | ------- | ---------- | -------------------------------------------------------- | ----------------------------------- | +| 0.1.2 | 2022-10-31 | [18729](https://github.com/airbytehq/airbyte/pull/18729) | Fix empty headers list | | 0.1.1 | 2022-06-15 | [14751](https://github.com/airbytehq/airbyte/pull/14751) | Yield state only when records saved | | 0.1.0 | 2022-04-26 | [12135](https://github.com/airbytehq/airbyte/pull/12135) | Initial Release |