Skip to content

Commit

Permalink
Source Surveymonkey: Fix spec.json required fields and update schema …
Browse files Browse the repository at this point in the history
…for surveys and survey_responses (airbytehq#25080)

* Fixes required fields on SurveyMonkey UI

* fix integration test schema update for surveys and survey response

* fix expected records

* update dockerfile and docs

* auto-bump connector version

---------

Co-authored-by: Ali Hassan <alihassan01264@gmail.com>
Co-authored-by: Ali Hassan <62539376+Alihassanc5@users.noreply.github.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
4 people authored and btkcodedev committed Apr 26, 2023
1 parent d209b60 commit 25850fa
Show file tree
Hide file tree
Showing 12 changed files with 299 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24567,7 +24567,7 @@
"sourceDefinitionId": "badc5925-0485-42be-8caa-b34096cb71b5",
"name": "SurveyMonkey",
"dockerRepository": "airbyte/source-surveymonkey",
"dockerImageTag": "0.1.15",
"dockerImageTag": "0.1.16",
"documentationUrl": "https://docs.airbyte.com/integrations/sources/surveymonkey",
"icon": "surveymonkey.svg",
"sourceType": "api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@
- name: SurveyMonkey
sourceDefinitionId: badc5925-0485-42be-8caa-b34096cb71b5
dockerRepository: airbyte/source-surveymonkey
dockerImageTag: 0.1.15
dockerImageTag: 0.1.16
documentationUrl: https://docs.airbyte.com/integrations/sources/surveymonkey
icon: surveymonkey.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15184,7 +15184,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-surveymonkey:0.1.15"
- dockerImage: "airbyte/source-surveymonkey:0.1.16"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/surveymonkey"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.15
LABEL io.airbyte.version=0.1.16
LABEL io.airbyte.name=airbyte/source-surveymonkey
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ acceptance_tests:
- spec_path: "source_surveymonkey/spec.json"
connection:
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
- config_path: "secrets/config_old.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
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 @@ -61,6 +61,9 @@
"analyze_url": {
"type": ["string", "null"]
},
"language": {
"type": ["string", "null"]
},
"total_time": {
"type": ["integer", "null"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"language": {
"type": ["string", "null"]
},
"theme_id": {
"type": ["string", "null"]
},
"folder_id": {
"type": ["string", "null"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class SourceSurveymonkey(AbstractSource):

SCOPES = {"responses_read_detail", "surveys_read", "users_read"}

@classmethod
Expand All @@ -34,11 +33,6 @@ def _check_credentials(cls, config: Mapping[str, Any]) -> Tuple[bool, Any]:
if not credentials.get("access_token"):
return False, "access_token in credentials is not provided"

if not credentials.get("client_id"):
return False, "client_id in credentials is not provided"

if not credentials.get("client_secret"):
return False, "client_secret in credentials is not provided"
return True, None

def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, Any]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,6 @@ def test_source_check_connection_failed_missing_scopes(requests_mock):
},
"access_token in credentials is not provided",
),
(
{
"start_date": "2021-01-01T00:00:00",
"origin": "USA",
"credentials": {"auth_method": "something", "access_token": "something", "client_id": "client_id"},
},
"client_secret in credentials is not provided",
),
(
{
"start_date": "2021-01-01T00:00:00",
"origin": "USA",
"credentials": {"auth_method": "something", "access_token": "something", "client_secret": "client_secret"},
},
"client_id in credentials is not provided",
),
],
)
def test_source_check_connection_failed_missing_credentials(config, err_msg):
Expand Down
2 changes: 1 addition & 1 deletion connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
| **Strava** | <img alt="Strava icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/strava.svg" height="30" height="30"/> | Source | airbyte/source-strava:0.1.4 | beta | [link](https://docs.airbyte.com/integrations/sources/strava) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-strava) | <small>`7a4327c4-315a-11ec-8d3d-0242ac130003`</small> |
| **Stripe** | <img alt="Stripe icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/stripe.svg" height="30" height="30"/> | Source | airbyte/source-stripe:3.1.0 | generally_available | [link](https://docs.airbyte.com/integrations/sources/stripe) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-stripe) | <small>`e094cb9a-26de-4645-8761-65c0c425d1de`</small> |
| **SurveyCTO** | <img alt="SurveyCTO icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/surveycto.svg" height="30" height="30"/> | Source | airbyte/source-surveycto:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/surveycto) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveycto) | <small>`dd4632f4-15e0-4649-9b71-41719fb1fdee`</small> |
| **SurveyMonkey** | <img alt="SurveyMonkey icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/surveymonkey.svg" height="30" height="30"/> | Source | airbyte/source-surveymonkey:0.1.15 | generally_available | [link](https://docs.airbyte.com/integrations/sources/surveymonkey) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveymonkey) | <small>`badc5925-0485-42be-8caa-b34096cb71b5`</small> |
| **SurveyMonkey** | <img alt="SurveyMonkey icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/surveymonkey.svg" height="30" height="30"/> | Source | airbyte/source-surveymonkey:0.1.16 | generally_available | [link](https://docs.airbyte.com/integrations/sources/surveymonkey) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveymonkey) | <small>`badc5925-0485-42be-8caa-b34096cb71b5`</small> |
| **SurveySparrow** | <img alt="SurveySparrow icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/surveysparrow.svg" height="30" height="30"/> | Source | airbyte/source-survey-sparrow:0.2.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/survey-sparrow) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-survey-sparrow) | <small>`4a4d887b-0f2d-4b33-ab7f-9b01b9072804`</small> |
| **TMDb** | <img alt="TMDb icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config-oss/init-oss/src/main/resources/icons/tmdb.svg" height="30" height="30"/> | Source | airbyte/source-tmdb:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/tmdb) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-tmdb) | <small>`6240848f-f795-45eb-8f5e-c7542822fc03`</small> |
| **TPLcentral** | x | Source | airbyte/source-tplcentral:0.1.1 | alpha | [link](https://docs.airbyte.com/integrations/sources/tplcentral) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-tplcentral) | <small>`f9b6c538-ee12-42fe-8d4b-0c10f5955417`</small> |
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/surveymonkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ To cover more data from this source we use caching.

| Version | Date | Pull Request | Subject |
|:--------| :--------- | :------------------------------------------------------- | :--------------------------------------------------------------------- |
| 0.1.16 | 2023-04-13 | [25080](https://github.com/airbytehq/airbyte/pull/25080) | Fix spec.json required fields and update schema for surveys and survey_responses |
| 0.1.15 | 2023-02-11 | [22865](https://github.com/airbytehq/airbyte/pull/22865) | Specified date formatting in specification |
| 0.1.14 | 2023-01-27 | [22024](https://github.com/airbytehq/airbyte/pull/22024) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 0.1.13 | 2022-11-29 | [19868](https://github.com/airbytehq/airbyte/pull/19868) | Fix OAuth flow urls |
Expand Down

0 comments on commit 25850fa

Please sign in to comment.