Skip to content

Commit aec20d5

Browse files
committed
migrate connector to manifest-only
1 parent b034e7d commit aec20d5

File tree

12 files changed

+35
-1585
lines changed

12 files changed

+35
-1585
lines changed

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

+25-63
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,63 @@
1-
# Sendinblue Source
1+
# Sendinblue source connector
22

3-
This is the repository for the Sendinblue configuration based source connector.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/sendinblue).
3+
This directory contains the manifest-only connector for `source-sendinblue`.
4+
This _manifest-only_ connector is not a Python package on its own, as it runs inside of the base `source-declarative-manifest` image.
5+
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/sendinblue).
57

68
## Local development
79

8-
### Prerequisites
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!
913

10-
* Python (`^3.9`)
11-
* Poetry (`^1.7`) - installation instructions [here](https://python-poetry.org/docs/#installation)
14+
If you prefer to develop locally, you can follow the instructions below.
1215

16+
### Building the docker image
1317

18+
You can build any manifest-only connector with `airbyte-ci`:
1419

15-
### Installing the connector
20+
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
21+
2. Run the following command to build the docker image:
1622

17-
From this connector directory, run:
1823
```bash
19-
poetry install --with dev
24+
airbyte-ci connectors --name=source-sendinblue build
2025
```
2126

27+
An image will be available on your host with the tag `airbyte/source-sendinblue:dev`.
2228

23-
### Create credentials
29+
### Creating credentials
2430

2531
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/sendinblue)
26-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `src/source_sendinblue/spec.yaml` file.
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.
2733
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
28-
See `sample_files/sample_config.json` for a sample config file.
29-
30-
31-
### Locally running the connector
32-
33-
```
34-
poetry run source-sendinblue spec
35-
poetry run source-sendinblue check --config secrets/config.json
36-
poetry run source-sendinblue discover --config secrets/config.json
37-
poetry run source-sendinblue read --config secrets/config.json --catalog sample_files/configured_catalog.json
38-
```
39-
40-
### Running tests
4134

42-
To run tests locally, from the connector directory run:
43-
44-
```
45-
poetry run pytest tests
46-
```
35+
### Running as a docker container
4736

48-
### Building the docker image
37+
Then run any of the standard source connector commands:
4938

50-
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
51-
2. Run the following command to build the docker image:
5239
```bash
53-
airbyte-ci connectors --name=source-sendinblue build
54-
```
55-
56-
An image will be available on your host with the tag `airbyte/source-sendinblue:dev`.
57-
58-
59-
### Running as a docker container
60-
61-
Then run any of the connector commands as follows:
62-
```
6340
docker run --rm airbyte/source-sendinblue:dev spec
6441
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sendinblue:dev check --config /secrets/config.json
6542
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sendinblue:dev discover --config /secrets/config.json
6643
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-sendinblue:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
6744
```
6845

69-
### Running our CI test suite
46+
### Running the CI test suite
7047

7148
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
72-
```bash
73-
airbyte-ci connectors --name=source-sendinblue test
74-
```
75-
76-
### Customizing acceptance Tests
7749

78-
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.
79-
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.
80-
81-
### Dependency Management
82-
83-
All of your dependencies should be managed via Poetry.
84-
To add a new dependency, run:
8550
```bash
86-
poetry add <package-name>
51+
airbyte-ci connectors --name=source-sendinblue test
8752
```
8853

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-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-sendinblue test`
95-
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)):
56+
If you want to contribute changes to `source-sendinblue`, 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-sendinblue 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)):
9660
- bump the `dockerImageTag` value in in `metadata.yaml`
97-
- bump the `version` value in `pyproject.toml`
98-
3. Make sure the `metadata.yaml` content is up to date.
9961
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/sendinblue.md`).
10062
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).
10163
6. Pat yourself on the back for being an awesome contributor.

airbyte-integrations/connectors/source-sendinblue/__init__.py

-3
This file was deleted.

airbyte-integrations/connectors/source-sendinblue/acceptance-test-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ connector_image: airbyte/source-sendinblue:dev
44
acceptance_tests:
55
spec:
66
tests:
7-
- spec_path: "source_sendinblue/spec.yaml"
7+
- spec_path: "manifest.yaml"
88
connection:
99
tests:
1010
- config_path: "secrets/config.json"

airbyte-integrations/connectors/source-sendinblue/main.py

-8
This file was deleted.

airbyte-integrations/connectors/source-sendinblue/source_sendinblue/manifest.yaml renamed to airbyte-integrations/connectors/source-sendinblue/manifest.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.78.5
1+
version: 4.5.4
22

33
type: DeclarativeSource
44

@@ -136,7 +136,7 @@ definitions:
136136
url_base: https://api.sendinblue.com/v3
137137
authenticator:
138138
type: ApiKeyAuthenticator
139-
api_token: "{{ config['api_key'] }}"
139+
api_token: '{{ config["api_key"] }}'
140140
inject_into:
141141
type: RequestOption
142142
field_name: api-key
@@ -157,20 +157,14 @@ spec:
157157
properties:
158158
api_key:
159159
type: string
160-
title: API Key
161-
airbyte_secret: true
162160
description: >-
163161
Your API Key. See <a
164162
href="https://developers.sendinblue.com/docs/getting-started">here</a>.
163+
title: API Key
164+
airbyte_secret: true
165165
order: 0
166166
additionalProperties: true
167167

168-
metadata:
169-
autoImportSchema:
170-
campaigns: false
171-
templates: false
172-
contacts: false
173-
174168
schemas:
175169
campaigns:
176170
type: object

airbyte-integrations/connectors/source-sendinblue/metadata.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ data:
99
# Please update to the latest version of the connector base image.
1010
# https://hub.docker.com/r/airbyte/python-connector-base
1111
# Please use the full address with sha256 hash to guarantee build reproducibility.
12-
baseImage: docker.io/airbyte/python-connector-base:2.0.0@sha256:c44839ba84406116e8ba68722a0f30e8f6e7056c726f447681bb9e9ece8bd916
12+
baseImage: docker.io/airbyte/source-declarative-manifest:4.5.4@sha256:b07a521add11f987c63c0db68c1b57e90bec0c985f1cb6f3c5a1940cde628a70
1313
connectorSubtype: api
1414
connectorType: source
1515
definitionId: 2e88fa20-a2f6-43cc-bba6-98a0a3f244fb
16-
dockerImageTag: 0.1.13
16+
dockerImageTag: 0.2.0
1717
dockerRepository: airbyte/source-sendinblue
1818
documentationUrl: https://docs.airbyte.com/integrations/sources/sendinblue
1919
githubIssueLabel: source-sendinblue
@@ -23,7 +23,7 @@ data:
2323
releaseDate: 2022-11-01
2424
remoteRegistries:
2525
pypi:
26-
enabled: true
26+
enabled: false
2727
packageName: airbyte-source-sendinblue
2828
registryOverrides:
2929
cloud:
@@ -33,8 +33,8 @@ data:
3333
releaseStage: alpha
3434
supportLevel: community
3535
tags:
36-
- language:python
3736
- cdk:low-code
37+
- language:manifest-only
3838
connectorTestSuitesOptions:
3939
- suite: liveTests
4040
testConnections:

0 commit comments

Comments
 (0)