Skip to content

Commit a40b071

Browse files
authored
source-sap-fieldglass: [autopull] base image + poetry + up_to_date (#38384)
1 parent db35b3b commit a40b071

File tree

7 files changed

+1408
-122
lines changed

7 files changed

+1408
-122
lines changed

airbyte-integrations/connectors/source-sap-fieldglass/Dockerfile

-38
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,91 @@
1-
# Sap Fieldglass Source
1+
# Sap-Fieldglass source connector
22

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

67
## Local development
78

8-
#### Create credentials
9+
### Prerequisites
10+
* Python (~=3.9)
11+
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
912

10-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/sap-fieldglass)
11-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_sap_fieldglass/spec.yaml` file.
12-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
13-
See `integration_tests/sample_config.json` for a sample config file.
1413

15-
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source sap-fieldglass test creds`
16-
and place them into `secrets/config.json`.
14+
### Installing the connector
15+
From this connector directory, run:
16+
```bash
17+
poetry install --with dev
18+
```
1719

18-
### Locally running the connector docker image
1920

20-
#### Build
21+
### Create credentials
22+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/sap-fieldglass)
23+
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_sap_fieldglass/spec.yaml` file.
24+
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
25+
See `sample_files/sample_config.json` for a sample config file.
2126

22-
**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
2327

24-
```bash
25-
airbyte-ci connectors --name=source-sap-fieldglass build
28+
### Locally running the connector
29+
```
30+
poetry run source-sap-fieldglass spec
31+
poetry run source-sap-fieldglass check --config secrets/config.json
32+
poetry run source-sap-fieldglass discover --config secrets/config.json
33+
poetry run source-sap-fieldglass read --config secrets/config.json --catalog sample_files/configured_catalog.json
2634
```
2735

28-
An image will be built with the tag `airbyte/source-sap-fieldglass:dev`.
29-
30-
**Via `docker build`:**
36+
### Running unit tests
37+
To run unit tests locally, from the connector directory run:
38+
```
39+
poetry run pytest unit_tests
40+
```
3141

42+
### Building the docker image
43+
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
44+
2. Run the following command to build the docker image:
3245
```bash
33-
docker build -t airbyte/source-sap-fieldglass:dev .
46+
airbyte-ci connectors --name=source-sap-fieldglass build
3447
```
3548

36-
#### Run
49+
An image will be available on your host with the tag `airbyte/source-sap-fieldglass:dev`.
3750

38-
Then run any of the connector commands as follows:
3951

52+
### Running as a docker container
53+
Then run any of the connector commands as follows:
4054
```
4155
docker run --rm airbyte/source-sap-fieldglass:dev spec
4256
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sap-fieldglass:dev check --config /secrets/config.json
4357
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-sap-fieldglass:dev discover --config /secrets/config.json
4458
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-sap-fieldglass:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
4559
```
4660

47-
## Testing
48-
61+
### Running our CI test suite
4962
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
50-
5163
```bash
5264
airbyte-ci connectors --name=source-sap-fieldglass test
5365
```
5466

5567
### Customizing acceptance Tests
56-
57-
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.
68+
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.
5869
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.
5970

60-
## Dependency Management
61-
62-
All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
63-
We split dependencies between two groups, dependencies that are:
64-
65-
- required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
66-
- required for the testing need to go to `TEST_REQUIREMENTS` list
71+
### Dependency Management
72+
All of your dependencies should be managed via Poetry.
73+
To add a new dependency, run:
74+
```bash
75+
poetry add <package-name>
76+
```
6777

68-
### Publishing a new version of the connector
78+
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
6979

80+
## Publishing a new version of the connector
7081
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
71-
7282
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-sap-fieldglass test`
73-
2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
83+
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)):
84+
- bump the `dockerImageTag` value in in `metadata.yaml`
85+
- bump the `version` value in `pyproject.toml`
7486
3. Make sure the `metadata.yaml` content is up to date.
75-
4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/sap-fieldglass.md`).
87+
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/sap-fieldglass.md`).
7688
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).
7789
6. Pat yourself on the back for being an awesome contributor.
7890
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
91+
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.

airbyte-integrations/connectors/source-sap-fieldglass/metadata.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ data:
22
connectorSubtype: api
33
connectorType: source
44
definitionId: ec5f3102-fb31-4916-99ae-864faf8e7e25
5-
dockerImageTag: 0.1.0
5+
dockerImageTag: 0.1.1
66
dockerRepository: airbyte/source-sap-fieldglass
77
githubIssueLabel: source-sap-fieldglass
88
icon: sapfieldglass.svg
@@ -34,4 +34,6 @@ data:
3434
secretStore:
3535
type: GSM
3636
alias: airbyte-connector-testing-secret-store
37+
connectorBuildOptions:
38+
baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9
3739
metadataSpecVersion: "1.0"

0 commit comments

Comments
 (0)