Skip to content

Commit d6ae694

Browse files
🎉Source Twilio: Added state checkpoint interval (#16110)
* Added state checkpoint interval * Bumped version * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
1 parent d1f44cc commit d6ae694

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,11 @@
10361036
- name: Twilio
10371037
sourceDefinitionId: b9dc6155-672e-42ea-b10d-9f1f1fb95ab1
10381038
dockerRepository: airbyte/source-twilio
1039-
dockerImageTag: 0.1.7
1039+
dockerImageTag: 0.1.8
10401040
documentationUrl: https://docs.airbyte.io/integrations/sources/twilio
10411041
icon: twilio.svg
10421042
sourceType: api
1043-
releaseStage: alpha
1043+
releaseStage: beta
10441044
- name: Typeform
10451045
sourceDefinitionId: e7eff203-90bf-43e5-a240-19ea3056c474
10461046
dockerRepository: airbyte/source-typeform

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10280,7 +10280,7 @@
1028010280
oauthFlowOutputParameters:
1028110281
- - "token"
1028210282
- - "key"
10283-
- dockerImage: "airbyte/source-twilio:0.1.7"
10283+
- dockerImage: "airbyte/source-twilio:0.1.8"
1028410284
spec:
1028510285
documentationUrl: "https://docs.airbyte.io/integrations/sources/twilio"
1028610286
connectionSpecification:

airbyte-integrations/connectors/source-twilio/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ COPY main.py ./
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.1.7
15+
LABEL io.airbyte.version=0.1.8
1616
LABEL io.airbyte.name=airbyte/source-twilio

airbyte-integrations/connectors/source-twilio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integrat
7979
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.
8080
First install test dependencies into your virtual environment:
8181
```
82-
pip install .[tests]
82+
pip install .'[tests]'
8383
```
8484
### Unit Tests
8585
To run unit tests locally, from the connector directory run:

airbyte-integrations/connectors/source-twilio/source_twilio/streams.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,18 @@ def custom_transform_function(original_value: Any, field_schema: Mapping[str, An
8787
try:
8888
return pendulum.from_format(original_value, "ddd, D MMM YYYY HH:mm:ss ZZ").in_timezone("UTC").to_iso8601_string()
8989
except ValueError:
90-
# Twilio API returns datetime in two formats:
91-
# - RFC2822, like "Fri, 11 Dec 2020 04:28:40 +0000";
92-
# - ISO8601, like "2020-12-11T04:29:09Z".
93-
# If `ValueError` exception was raised this means that datetime was already in ISO8601 format and there
94-
# is no need in transforming anything.
90+
"""Twilio API returns datetime in two formats:
91+
- RFC2822, like "Fri, 11 Dec 2020 04:28:40 +0000";
92+
- ISO8601, like "2020-12-11T04:29:09Z".
93+
If `ValueError` exception was raised this means that datetime was already in ISO8601 format and there
94+
is no need in transforming anything."""
9595
pass
9696
return original_value
9797

9898

9999
class IncrementalTwilioStream(TwilioStream, IncrementalMixin):
100100
time_filter_template = "YYYY-MM-DD HH:mm:ss[Z]"
101+
state_checkpoint_interval = 1000
101102

102103
def __init__(self, start_date: str = None, lookback_window: int = 0, **kwargs):
103104
super().__init__(**kwargs)

docs/integrations/sources/twilio.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ For more information, see [the Twilio docs for rate limitations](https://support
8080

8181
| Version | Date | Pull Request | Subject |
8282
|:--------|:------------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|
83-
| 0.1.7 | 2022-08-26 | [15972](https://github.com/airbytehq/airbyte/pull/15972) | Shift start date for stream if it exceeds 400 days |
83+
| 0.1.8 | 2022-08-29 | [16110](https://github.com/airbytehq/airbyte/pull/16110) | Add state checkpoint interval |
84+
| 0.1.7 | 2022-08-26 | [15972](https://github.com/airbytehq/airbyte/pull/15972) | Shift start date for stream if it exceeds 400 days |
8485
| 0.1.6 | 2022-06-22 | [14000](https://github.com/airbytehq/airbyte/pull/14000) | Update Records stream schema and align tests with connectors' best practices |
8586
| 0.1.5 | 2022-06-22 | [13896](https://github.com/airbytehq/airbyte/pull/13896) | Add lookback window parameters to fetch messages with a rolling window and catch status updates |
8687
| 0.1.4 | 2022-04-22 | [12157](https://github.com/airbytehq/airbyte/pull/12157) | Use Retry-After header for backoff |

0 commit comments

Comments
 (0)