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

🐛 Source Insightly: Fix state date conversion bug #19356

Merged
merged 12 commits into from
Jan 17, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,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 @@ -6499,7 +6499,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 |