From fc0a02538cfa18db70af66a4fcf2c5ac970dc6e1 Mon Sep 17 00:00:00 2001 From: yaroslav-dudar Date: Fri, 3 Sep 2021 11:35:49 +0300 Subject: [PATCH 1/2] fixed array schemas in companies --- .../36c891d9-4bd9-43ac-bad2-10e12756272c.json | 2 +- .../resources/seed/source_definitions.yaml | 2 +- .../connectors/source-hubspot/Dockerfile | 2 +- .../source-hubspot/acceptance-test-config.yml | 4 +- .../integration_tests/integration_test.py | 27 ---------- .../source_hubspot/schemas/campaigns.json | 2 +- .../source_hubspot/schemas/companies.json | 49 ++++++++++++++++--- .../source_hubspot/schemas/line_items.json | 2 +- docs/integrations/sources/hubspot.md | 3 +- 9 files changed, 51 insertions(+), 42 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-hubspot/integration_tests/integration_test.py diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json index 2e3ea3f26913a..7c319eec4c89e 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "36c891d9-4bd9-43ac-bad2-10e12756272c", "name": "Hubspot", "dockerRepository": "airbyte/source-hubspot", - "dockerImageTag": "0.1.11", + "dockerImageTag": "0.1.12", "documentationUrl": "https://docs.airbyte.io/integrations/sources/hubspot", "icon": "hubspot.svg" } diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index ec6800bfce59c..0e5ab189cb7c2 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -143,7 +143,7 @@ - sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c name: Hubspot dockerRepository: airbyte/source-hubspot - dockerImageTag: 0.1.11 + dockerImageTag: 0.1.12 documentationUrl: https://docs.airbyte.io/integrations/sources/hubspot icon: hubspot.svg - sourceDefinitionId: 95e8cffd-b8c4-4039-968e-d32fb4a69bde diff --git a/airbyte-integrations/connectors/source-hubspot/Dockerfile b/airbyte-integrations/connectors/source-hubspot/Dockerfile index 51d773f4faa7f..2f18fda5f9c82 100644 --- a/airbyte-integrations/connectors/source-hubspot/Dockerfile +++ b/airbyte-integrations/connectors/source-hubspot/Dockerfile @@ -14,5 +14,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" -LABEL io.airbyte.version=0.1.11 +LABEL io.airbyte.version=0.1.12 LABEL io.airbyte.name=airbyte/source-hubspot diff --git a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml index a1d51065fdb86..ceb78e017f5d1 100644 --- a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml @@ -7,8 +7,8 @@ tests: status: "succeed" - config_path: "integration_tests/invalid_config.json" status: "failed" -# discovery: fixme (eugene): contacts schema does not match -# - config_path: "secrets/config.json" + discovery: + - config_path: "secrets/config.json" basic_read: - config_path: "secrets/config.json" # TODO: permissions error with Workflows stream for Test Account diff --git a/airbyte-integrations/connectors/source-hubspot/integration_tests/integration_test.py b/airbyte-integrations/connectors/source-hubspot/integration_tests/integration_test.py deleted file mode 100644 index 6d275a2544ab8..0000000000000 --- a/airbyte-integrations/connectors/source-hubspot/integration_tests/integration_test.py +++ /dev/null @@ -1,27 +0,0 @@ -# -# MIT License -# -# Copyright (c) 2020 Airbyte -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - - -def test_example(): - assert True diff --git a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/campaigns.json b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/campaigns.json index d6885bd95ee70..ea20c05038007 100644 --- a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/campaigns.json +++ b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/campaigns.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", + "type": ["null", "object"], "properties": { "appId": { "type": ["null", "integer"] diff --git a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/companies.json b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/companies.json index dc94a0317418e..eb20e11de8a95 100644 --- a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/companies.json +++ b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/companies.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", + "type": ["null", "object"], "properties": { "portalId": { "type": ["null", "integer"] @@ -11,17 +11,52 @@ "isDeleted": { "type": ["null", "boolean"] }, - "additionalDomains": { - "type": ["null", "array"] - }, "stateChanges": { - "type": ["null", "array"] + "type": ["null", "array"], + "items": { + "type": ["null", "object"] + } + }, + "additionalDomains": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } }, "mergeAudits": { - "type": ["null", "array"] + "type": ["null", "array"], + "items": { + "type": ["null", "object"], + "properties": { + "mergedCompanyId": { + "type": ["null", "integer"] + }, + "canonicalCompanyId": { + "type": ["null", "integer"] + }, + "sourceId": { + "type": ["null", "string"] + }, + "entityId": { + "type": ["null", "string"] + }, + "mergedCompanyName": { + "type": ["null", "string"] + }, + "movedProperties": { + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } + } + } + } }, "contacts": { - "type": ["null", "array"] + "type": ["null", "array"], + "items": { + "type": ["null", "string"] + } }, "createdAt": { "type": ["null", "string"] diff --git a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/line_items.json b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/line_items.json index 9716cb9e6d5f1..ad845580d83ac 100644 --- a/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/line_items.json +++ b/airbyte-integrations/connectors/source-hubspot/source_hubspot/schemas/line_items.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", + "type": ["null", "object"], "properties": { "objectType": { "type": ["null", "string"] diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index fcabe61193d4b..b2265e7b73207 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -39,7 +39,7 @@ Several output streams are available from this source: The connector is restricted by normal Hubspot [rate limitations](https://legacydocs.hubspot.com/apps/api_guidelines). -When connector reads the stream using `API Key` that doesn't have neccessary permissions to read particular stream, like `workflows`, which requires to be enabled in order to be processed, the log message returned to the output and sync operation goes on with other streams available. +When connector reads the stream using `API Key` that doesn't have neccessary permissions to read particular stream, like `workflows`, which requires to be enabled in order to be processed, the log message returned to the output and sync operation goes on with other streams available. Example of the output message when trying to read `workflows` stream with missing permissions for the `API Key`: ``` @@ -73,6 +73,7 @@ This connector supports only authentication with API Key. To obtain API key for | Version | Date | Pull Request | Subject | | :------ | :-------- | :----- | :------ | +| 0.1.12 | 2021-09-04 | [](https://github.com/airbytehq/airbyte/pull/) | Fixed array fields without items property in schema | | 0.1.11 | 2021-08-26 | [5463](https://github.com/airbytehq/airbyte/pull/5463) | Remove all date-time format from schemas | | 0.1.10 | 2021-08-17 | [5463](https://github.com/airbytehq/airbyte/pull/5463) | Fix fail on reading stream using `API Key` without required permissions | | 0.1.9 | 2021-08-11 | [5334](https://github.com/airbytehq/airbyte/pull/5334) | Fix empty strings inside float datatype | From 05d8a6de64c55208f5ad86ffc40af1ce19c11bd7 Mon Sep 17 00:00:00 2001 From: yaroslav-dudar Date: Fri, 3 Sep 2021 11:47:57 +0300 Subject: [PATCH 2/2] fixed docs --- docs/integrations/sources/hubspot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index b2265e7b73207..5ee4e2b41ef75 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -73,7 +73,7 @@ This connector supports only authentication with API Key. To obtain API key for | Version | Date | Pull Request | Subject | | :------ | :-------- | :----- | :------ | -| 0.1.12 | 2021-09-04 | [](https://github.com/airbytehq/airbyte/pull/) | Fixed array fields without items property in schema | +| 0.1.12 | 2021-09-04 | [5834](https://github.com/airbytehq/airbyte/pull/5834) | Fixed array fields without items property in schema | | 0.1.11 | 2021-08-26 | [5463](https://github.com/airbytehq/airbyte/pull/5463) | Remove all date-time format from schemas | | 0.1.10 | 2021-08-17 | [5463](https://github.com/airbytehq/airbyte/pull/5463) | Fix fail on reading stream using `API Key` without required permissions | | 0.1.9 | 2021-08-11 | [5334](https://github.com/airbytehq/airbyte/pull/5334) | Fix empty strings inside float datatype |