From 088454fbdb9cd967f253c09a75071c024676281f Mon Sep 17 00:00:00 2001 From: Henri Blancke Date: Thu, 3 Nov 2022 18:33:01 -0400 Subject: [PATCH 1/4] [FIX] cursor cast Signed-off-by: Henri Blancke --- .../connectors/source-insightly/source_insightly/source.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-insightly/source_insightly/source.py b/airbyte-integrations/connectors/source-insightly/source_insightly/source.py index fe3906c7d958..43889547a9e7 100644 --- a/airbyte-integrations/connectors/source-insightly/source_insightly/source.py +++ b/airbyte-integrations/connectors/source-insightly/source_insightly/source.py @@ -179,7 +179,11 @@ def request_params( start_datetime = pendulum.parse(self.start_date) if stream_state.get(self.cursor_field): - start_datetime = pendulum.parse(stream_state[self.cursor_field]) + start_datetime_raw = stream_state[self.cursor_field] + if isinstance(start_datetime_raw, datetime): + start_datetime = start_datetime_raw + else: + start_datetime = pendulum.parse(stream_state[self.cursor_field]) # Add one second to avoid duplicate records and ensure greater than params.update({"updated_after_utc": (start_datetime + timedelta(seconds=1)).strftime("%Y-%m-%dT%H:%M:%SZ")}) From 7490353e4021676f92caf7f5a8b237fd551dee0f Mon Sep 17 00:00:00 2001 From: Henri Blancke Date: Fri, 11 Nov 2022 10:07:51 -0500 Subject: [PATCH 2/4] [UPD] bump version Signed-off-by: Henri Blancke --- .../connectors/source-insightly/Dockerfile | 2 +- docs/integrations/sources/insightly.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/airbyte-integrations/connectors/source-insightly/Dockerfile b/airbyte-integrations/connectors/source-insightly/Dockerfile index 37b76fba0d19..9c32ac56d087 100644 --- a/airbyte-integrations/connectors/source-insightly/Dockerfile +++ b/airbyte-integrations/connectors/source-insightly/Dockerfile @@ -34,5 +34,5 @@ COPY source_insightly ./source_insightly ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.0 +LABEL io.airbyte.version=0.1.1 LABEL io.airbyte.name=airbyte/source-insightly diff --git a/docs/integrations/sources/insightly.md b/docs/integrations/sources/insightly.md index 21f8549ca9c8..3f77f97ed97f 100644 --- a/docs/integrations/sources/insightly.md +++ b/docs/integrations/sources/insightly.md @@ -69,6 +69,7 @@ The connector is restricted by Insightly [requests limitation](https://api.na1.i ## Changelog -| Version | Date | Pull Request | Subject | -| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | -| 0.1.0 | 2021-07-19 | | Release Insightly CDK Connector | +| Version | Date | Pull Request | Subject | +| :------ | :--------- | :------------------------------------------------------- | :-------------------------------------------------------------------------------- | +| 0.1.1 | 2022-11-11 | | Fix state date parse bug | +| 0.1.0 | 2022-10-19 | | Release Insightly CDK Connector | From 986b0867a2a3ecc98460d5abe5e2d580a87e5530 Mon Sep 17 00:00:00 2001 From: Henri Blancke Date: Tue, 15 Nov 2022 11:26:06 -0500 Subject: [PATCH 3/4] [FIX] add pendulum dependency Signed-off-by: Henri Blancke --- airbyte-integrations/connectors/source-insightly/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/airbyte-integrations/connectors/source-insightly/setup.py b/airbyte-integrations/connectors/source-insightly/setup.py index 490ed64ed1c4..d288f5200b9b 100644 --- a/airbyte-integrations/connectors/source-insightly/setup.py +++ b/airbyte-integrations/connectors/source-insightly/setup.py @@ -7,6 +7,7 @@ MAIN_REQUIREMENTS = [ "airbyte-cdk~=0.2", + "pendulum==2.1.2", ] TEST_REQUIREMENTS = [ From 9ae0120e1430461c69004a06f6d130cf4f91b9a9 Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Tue, 15 Nov 2022 22:04:21 +0000 Subject: [PATCH 4/4] auto-bump connector version --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- airbyte-config/init/src/main/resources/seed/source_specs.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 7f48a86ce8cc..74e92ac0a0d5 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -680,7 +680,7 @@ - name: Insightly sourceDefinitionId: 38f84314-fe6a-4257-97be-a8dcd942d693 dockerRepository: airbyte/source-insightly - dockerImageTag: 0.1.0 + dockerImageTag: 0.1.1 documentationUrl: https://docs.airbyte.com/integrations/sources/insightly sourceType: api releaseStage: alpha diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 648f1a1afadf..9d413fa50815 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -6139,7 +6139,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-insightly:0.1.0" +- dockerImage: "airbyte/source-insightly:0.1.1" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/insightly" connectionSpecification: