Skip to content

Commit 528127a

Browse files
🎉 Migrate Confluence Source Connector to Low Code (#29125)
Co-authored-by: Sajarin <sajarindider@gmail.com>
1 parent 96e862f commit 528127a

File tree

25 files changed

+236
-473
lines changed

25 files changed

+236
-473
lines changed

airbyte-integrations/connectors/source-confluence/.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
*
22
!Dockerfile
3-
!Dockerfile.test
43
!main.py
54
!source_confluence
65
!setup.py

airbyte-integrations/connectors/source-confluence/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_confluence ./source_confluence
3434
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3535
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3636

37-
LABEL io.airbyte.version=0.1.3
37+
LABEL io.airbyte.version=0.2.0
3838
LABEL io.airbyte.name=airbyte/source-confluence

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

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
# Confluence Source
22

3-
This is the repository for the Confluence source connector, written in Python.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/confluence).
3+
This is the repository for the Confluence configuration based source connector.
4+
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/confluence).
55

66
## Local development
77

8-
### Prerequisites
9-
**To iterate on this connector, make sure to complete this prerequisites section.**
10-
11-
#### Minimum Python version required `= 3.7.0`
12-
13-
#### Build & Activate Virtual Environment and install dependencies
14-
From this connector directory, create a virtual environment:
15-
```
16-
python -m venv .venv
17-
```
18-
19-
This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
20-
development environment of choice. To activate it from the terminal, run:
21-
```
22-
source .venv/bin/activate
23-
pip install -r requirements.txt
24-
pip install '.[tests]'
25-
```
26-
If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
27-
28-
Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
29-
used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
30-
If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
31-
should work as you expect.
32-
338
#### Building via Gradle
349
You can also build the connector in Gradle. This is typically used in CI and not needed for your development workflow.
3510

@@ -39,22 +14,14 @@ To build using Gradle, from the Airbyte repository root, run:
3914
```
4015

4116
#### Create credentials
42-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/confluence)
43-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_confluence/spec.json` file.
17+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/confluence)
18+
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_confluence/spec.yaml` file.
4419
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
4520
See `integration_tests/sample_config.json` for a sample config file.
4621

4722
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source confluence test creds`
4823
and place them into `secrets/config.json`.
4924

50-
### Locally running the connector
51-
```
52-
python main.py spec
53-
python main.py check --config secrets/config.json
54-
python main.py discover --config secrets/config.json
55-
python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
56-
```
57-
5825
### Locally running the connector docker image
5926

6027
#### Build
@@ -79,32 +46,15 @@ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-confluence:dev discove
7946
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-confluence:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
8047
```
8148
## Testing
82-
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.
83-
First install test dependencies into your virtual environment:
84-
```
85-
pip install .[tests]
86-
```
87-
### Unit Tests
88-
To run unit tests locally, from the connector directory run:
89-
```
90-
python -m pytest unit_tests
91-
```
9249

93-
### Integration Tests
94-
There are two types of integration tests: Acceptance Tests (Airbyte's test suite for all source connectors) and custom integration tests (which are specific to this connector).
95-
#### Custom Integration tests
96-
Place custom tests inside `integration_tests/` folder, then, from the connector root, run
97-
```
98-
python -m pytest integration_tests
99-
```
10050
#### Acceptance Tests
101-
Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
51+
Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
10252
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.
103-
To run your integration tests with acceptance tests, from the connector root, run
53+
54+
To run your integration tests with Docker, run:
10455
```
105-
python -m pytest integration_tests -p integration_tests.acceptance
56+
./acceptance-test-docker.sh
10657
```
107-
To run your integration tests with docker
10858

10959
### Using gradle to run tests
11060
All commands should be run from airbyte project root.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#
2+
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3+
#

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ connector_image: airbyte/source-confluence:dev
44
acceptance_tests:
55
spec:
66
tests:
7-
- spec_path: "source_confluence/spec.json"
7+
- spec_path: "source_confluence/spec.yaml"
88
connection:
99
tests:
1010
- config_path: "secrets/config.json"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/usr/bin/env sh
2+
23
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#
2-
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
2+
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
33
#

airbyte-integrations/connectors/source-confluence/integration_tests/configured_catalog.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "audit",
66
"json_schema": {},
77
"supported_sync_modes": ["full_refresh"],
8-
"source_defined_primary_key": [["author"]]
8+
"source_defined_primary_key": [["creationDate"]]
99
},
1010
"sync_mode": "full_refresh",
1111
"destination_sync_mode": "overwrite"

0 commit comments

Comments
 (0)