Skip to content

Commit

Permalink
🐛 Source Airtable: fix API Key authentication (#22224)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov committed Feb 1, 2023
1 parent 0ae8fdb commit b0dd975
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
- name: Airtable
sourceDefinitionId: 14c6e7ea-97ed-4f5e-a7b5-25e9a80b8212
dockerRepository: airbyte/source-airtable
dockerImageTag: 2.0.0
dockerImageTag: 2.0.1
documentationUrl: https://docs.airbyte.com/integrations/sources/airtable
icon: airtable.svg
sourceType: api
releaseStage: beta
allowedHosts:
hosts:
- api.airtable.com
- airtable.com
- name: Aha
sourceDefinitionId: 81ca39dc-4534-4dd2-b848-b0cfd2c11fce
dockerRepository: airbyte/source-aha
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-airtable:2.0.0"
- dockerImage: "airbyte/source-airtable:2.0.1"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/airtable"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-airtable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_airtable ./source_airtable
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=2.0.0
LABEL io.airbyte.version=2.0.1
LABEL io.airbyte.name=airbyte/source-airtable
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ acceptance_tests:
discovery:
tests:
- config_path: "secrets/config.json"
# the static `string` schema is replaced with casted to JSONSchema
backward_compatibility_tests_config:
disable_for_version: "1.0.2"
- config_path: "secrets/config_oauth.json"
# the static `string` schema is replaced with casted to JSONSchema
backward_compatibility_tests_config:
disable_for_version: "1.0.2"
basic_read:
tests:
- config_path: "secrets/config.json"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ def __new__(cls, config: dict) -> Union[TokenAuthenticator, AirtableOAuth]:
if "api_key" in config:
return TokenAuthenticator(token=(config or {}).get("api_key"))
# for new oauth configs
return AirtableOAuth(config, "https://airtable.com/oauth2/v1/token")
credentials = config["credentials"]
if credentials["auth_method"] == "oauth2.0":
return AirtableOAuth(config, "https://airtable.com/oauth2/v1/token")
elif credentials["auth_method"] == "api_key":
return TokenAuthenticator(token=credentials["api_key"])
1 change: 1 addition & 0 deletions docs/integrations/sources/airtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ See information about rate limits [here](https://airtable.com/developers/web/api

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------|
| 2.0.1 | 2023-02-01 | [22224](https://github.com/airbytehq/airbyte/pull/22224) | Fixed broken `API Key` authentication
| 2.0.0 | 2023-01-27 | [21962](https://github.com/airbytehq/airbyte/pull/21962) | Added casting of native Airtable data types to JsonSchema types
| 1.0.2 | 2023-01-25 | [20934](https://github.com/airbytehq/airbyte/pull/20934) | Added `OAuth2.0` authentication support
| 1.0.1 | 2023-01-10 | [21215](https://github.com/airbytehq/airbyte/pull/21215) | Fix field names |
Expand Down

0 comments on commit b0dd975

Please sign in to comment.