Skip to content

Commit 0f6466d

Browse files
authored
Source twilio-taskrouter: Migrate to manifest-only (#44776)
1 parent bb28fe0 commit 0f6466d

File tree

12 files changed

+42
-1205
lines changed

12 files changed

+42
-1205
lines changed

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

+25-64
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,22 @@
1-
# Twilio-Taskrouter source connector
1+
# Twilio Taskrouter source connector
22

3-
This is the repository for the Twilio-Taskrouter source connector, written in Python.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/twilio-taskrouter).
3+
This directory contains the manifest-only connector for `source-twilio-taskrouter`.
4+
This _manifest-only_ connector is not a Python package on its own, as it runs inside of the base `source-declarative-manifest` image.
55

6-
## Local development
7-
8-
### Prerequisites
9-
10-
- Python (~=3.9)
11-
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
12-
13-
### Installing the connector
14-
15-
From this connector directory, run:
16-
17-
```bash
18-
poetry install --with dev
19-
```
20-
21-
### Create credentials
6+
For information about how to configure and use this connector within Airbyte, see [the connector's full documentation](https://docs.airbyte.com/integrations/sources/twilio-taskrouter).
227

23-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/twilio-taskrouter)
24-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_twilio_taskrouter/spec.yaml` file.
25-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
26-
See `sample_files/sample_config.json` for a sample config file.
27-
28-
### Locally running the connector
29-
30-
```
31-
poetry run source-twilio-taskrouter spec
32-
poetry run source-twilio-taskrouter check --config secrets/config.json
33-
poetry run source-twilio-taskrouter discover --config secrets/config.json
34-
poetry run source-twilio-taskrouter read --config secrets/config.json --catalog sample_files/configured_catalog.json
35-
```
8+
## Local development
369

37-
### Running unit tests
10+
We recommend using the Connector Builder to edit this connector.
11+
Using either Airbyte Cloud or your local Airbyte OSS instance, navigate to the **Builder** tab and select **Import a YAML**.
12+
Then select the connector's `manifest.yaml` file to load the connector into the Builder. You're now ready to make changes to the connector!
3813

39-
To run unit tests locally, from the connector directory run:
40-
41-
```
42-
poetry run pytest unit_tests
43-
```
14+
If you prefer to develop locally, you can follow the instructions below.
4415

4516
### Building the docker image
4617

18+
You can build any manifest-only connector with `airbyte-ci`:
19+
4720
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
4821
2. Run the following command to build the docker image:
4922

@@ -53,50 +26,38 @@ airbyte-ci connectors --name=source-twilio-taskrouter build
5326

5427
An image will be available on your host with the tag `airbyte/source-twilio-taskrouter:dev`.
5528

29+
### Creating credentials
30+
31+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/twilio-taskrouter)
32+
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `spec` object in the connector's `manifest.yaml` file.
33+
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
34+
5635
### Running as a docker container
5736

58-
Then run any of the connector commands as follows:
37+
Then run any of the standard source connector commands:
5938

60-
```
39+
```bash
6140
docker run --rm airbyte/source-twilio-taskrouter:dev spec
6241
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-twilio-taskrouter:dev check --config /secrets/config.json
6342
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-twilio-taskrouter:dev discover --config /secrets/config.json
6443
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-twilio-taskrouter:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
6544
```
6645

67-
### Running our CI test suite
46+
### Running the CI test suite
6847

6948
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
7049

7150
```bash
7251
airbyte-ci connectors --name=source-twilio-taskrouter test
7352
```
7453

75-
### Customizing acceptance Tests
76-
77-
Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
78-
If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
79-
80-
### Dependency Management
81-
82-
All of your dependencies should be managed via Poetry.
83-
To add a new dependency, run:
84-
85-
```bash
86-
poetry add <package-name>
87-
```
88-
89-
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
90-
9154
## Publishing a new version of the connector
9255

93-
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
94-
95-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-twilio-taskrouter test`
96-
2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
97-
- bump the `dockerImageTag` value in in `metadata.yaml`
98-
- bump the `version` value in `pyproject.toml`
99-
3. Make sure the `metadata.yaml` content is up to date.
56+
If you want to contribute changes to `source-twilio-taskrouter`, here's how you can do that:
57+
1. Make your changes locally, or load the connector's manifest into Connector Builder and make changes there.
58+
2. Make sure your changes are passing our test suite with `airbyte-ci connectors --name=source-twilio-taskrouter test`
59+
3. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
60+
- bump the `dockerImageTag` value in in `metadata.yaml`
10061
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/twilio-taskrouter.md`).
10162
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
10263
6. Pat yourself on the back for being an awesome contributor.

airbyte-integrations/connectors/source-twilio-taskrouter/__init__.py

-3
This file was deleted.

airbyte-integrations/connectors/source-twilio-taskrouter/acceptance-test-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
connector_image: airbyte/source-twilio-taskrouter:dev
44
tests:
55
spec:
6-
- spec_path: "source_twilio_taskrouter/spec.yaml"
6+
- spec_path: "manifest.yaml"
77
connection:
88
- config_path: "secrets/config.json"
99
status: "succeed"

airbyte-integrations/connectors/source-twilio-taskrouter/main.py

-8
This file was deleted.

airbyte-integrations/connectors/source-twilio-taskrouter/source_twilio_taskrouter/manifest.yaml airbyte-integrations/connectors/source-twilio-taskrouter/manifest.yaml

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.79.1
1+
version: 4.5.4
22

33
type: DeclarativeSource
44

@@ -72,13 +72,13 @@ definitions:
7272
page_size: 50
7373
cursor_value: "{{response['meta']['next_page_url']}}"
7474
partition_router:
75-
- type: SubstreamPartitionRouter
76-
parent_stream_configs:
77-
- type: ParentStreamConfig
78-
parent_key: sid
79-
partition_field: id
80-
stream:
81-
$ref: "#/definitions/streams/workspaces"
75+
type: SubstreamPartitionRouter
76+
parent_stream_configs:
77+
- type: ParentStreamConfig
78+
parent_key: sid
79+
partition_field: id
80+
stream:
81+
$ref: "#/definitions/streams/workspaces"
8282
schema_loader:
8383
type: InlineSchemaLoader
8484
schema:
@@ -88,8 +88,8 @@ definitions:
8888
url_base: https://taskrouter.twilio.com
8989
authenticator:
9090
type: BasicHttpAuthenticator
91-
username: "{{ config['account_sid'] }}"
92-
password: "{{ config['auth_token'] }}"
91+
username: '{{ config["account_sid"] }}'
92+
password: '{{ config["auth_token"] }}'
9393

9494
streams:
9595
- $ref: "#/definitions/streams/workspaces"
@@ -106,8 +106,8 @@ spec:
106106
properties:
107107
account_sid:
108108
type: string
109-
title: Account SID
110109
description: Twilio Account ID
110+
title: Account SID
111111
airbyte_secret: true
112112
order: 0
113113
auth_token:
@@ -118,11 +118,6 @@ spec:
118118
order: 1
119119
additionalProperties: true
120120

121-
metadata:
122-
autoImportSchema:
123-
workspaces: false
124-
workers: false
125-
126121
schemas:
127122
workspaces:
128123
type: object

airbyte-integrations/connectors/source-twilio-taskrouter/metadata.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ data:
33
ql: 100
44
sl: 100
55
connectorBuildOptions:
6-
baseImage: docker.io/airbyte/python-connector-base:2.0.0@sha256:c44839ba84406116e8ba68722a0f30e8f6e7056c726f447681bb9e9ece8bd916
6+
baseImage: docker.io/airbyte/source-declarative-manifest:4.5.4@sha256:b07a521add11f987c63c0db68c1b57e90bec0c985f1cb6f3c5a1940cde628a70
77
connectorSubtype: api
88
connectorType: source
99
definitionId: 2446953b-b794-429b-a9b3-c821ba992a48
10-
dockerImageTag: 0.1.17
10+
dockerImageTag: 0.2.0
1111
dockerRepository: airbyte/source-twilio-taskrouter
1212
documentationUrl: https://docs.airbyte.com/integrations/sources/twilio-taskrouter
1313
githubIssueLabel: source-twilio-taskrouter
@@ -22,12 +22,12 @@ data:
2222
releaseStage: alpha
2323
remoteRegistries:
2424
pypi:
25-
enabled: true
25+
enabled: false
2626
packageName: airbyte-source-twilio-taskrouter
2727
supportLevel: community
2828
tags:
29-
- language:python
3029
- cdk:low-code
30+
- language:manifest-only
3131
connectorTestSuitesOptions:
3232
- suite: liveTests
3333
testConnections:

0 commit comments

Comments
 (0)