Skip to content

Commit

Permalink
🐛 Source Insightly: Fix state date conversion bug (#19356)
Browse files Browse the repository at this point in the history
* [FIX] cursor cast

Signed-off-by: Henri Blancke <[email protected]>

* [UPD] bump version

Signed-off-by: Henri Blancke <[email protected]>

* [FIX] add pendulum dependency

Signed-off-by: Henri Blancke <[email protected]>

* auto-bump connector version

Signed-off-by: Henri Blancke <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>
Co-authored-by: Sajarin <[email protected]>
  • Loading branch information
4 people authored Jan 17, 2023
1 parent e38baf4 commit 3c39e0c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,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
icon: insightly.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6523,7 +6523,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions airbyte-integrations/connectors/source-insightly/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

MAIN_REQUIREMENTS = [
"airbyte-cdk~=0.2",
"pendulum==2.1.2",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")})
Expand Down
7 changes: 4 additions & 3 deletions docs/integrations/sources/insightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

0 comments on commit 3c39e0c

Please sign in to comment.