Skip to content

Commit

Permalink
Merge pull request #158 from rudderlabs/fix-ETL-135-intercomImageBuil…
Browse files Browse the repository at this point in the history
…dIssue

Source Intercom: migrate to latest cdk (0.50.2) (airbytehq#29598)
  • Loading branch information
a-rampalli committed Sep 15, 2023
2 parents 86b38df + 61da7cb commit 4bd415f
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 403 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-intercom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_intercom ./source_intercom
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.1
LABEL io.airbyte.version=0.3.0
LABEL io.airbyte.name=airbyte/source-intercom
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ acceptance_tests:
spec:
tests:
- spec_path: "source_intercom/spec.json"
# Spec fix: advanced auth configuration contain `client_id` and `client_secret` fields but they were missing in spec.
backward_compatibility_tests_config:
disable_for_version: "0.2.1"
connection:
tests:
- config_path: "secrets/config.json"
Expand All @@ -15,12 +18,14 @@ acceptance_tests:
discovery:
tests:
- config_path: "secrets/config.json"
# Schema fix: update schemas with undeclared fields which is not breaking change
backward_compatibility_tests_config:
disable_for_version: "0.2.1"
basic_read:
tests:
- config_path: "secrets/config.json"
expect_records:
path: "integration_tests/expected_records.jsonl"
fail_on_extra_columns: false
incremental:
tests:
- config_path: "secrets/config.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: d8313939-3782-41b0-be29-b3ca20d8dd3a
dockerImageTag: 0.2.1
dockerImageTag: 0.3.0
dockerRepository: airbyte/source-intercom
githubIssueLabel: source-intercom
icon: intercom.svg
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-intercom/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk==0.29.0",
"airbyte-cdk",
]

TEST_REQUIREMENTS = [
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.1.0"
version: "0.50.2"

definitions:

Expand All @@ -23,6 +23,8 @@ definitions:
request_headers:
Intercom-Version: '2.5' # ATTENTION: API version change is possible here
Accept: 'application/json'
error_handler:
type: "DefaultErrorHandler"
retriever:
description: "Base Retriever for Full Refresh streams"
record_selector:
Expand All @@ -41,7 +43,7 @@ definitions:
inject_into: request_parameter
field_name: per_page
page_token_option:
type: RequestPath
type: RequestPath
requester_incremental_search:
$ref: "#/definitions/requester"
http_method: "POST"
Expand All @@ -67,7 +69,7 @@ definitions:
'page': {{ next_page_token.get('next_page_token').get('page') }},
'starting_after': '{{ next_page_token.get('next_page_token').get('starting_after') }}'
}"

## streams
# full-refresh
stream_full_refresh:
Expand Down Expand Up @@ -106,7 +108,7 @@ definitions:
primary_key: "name"
path: "teams"
data_field: "teams"

stream_data_attributes:
description: "https://developers.intercom.com/intercom-api-reference/reference#list-data-attributes"
$ref: "#/definitions/stream_full_refresh"
Expand All @@ -132,15 +134,15 @@ definitions:
primary_key: "name"
path: "data_attributes"
model: "contact"

# semi-incremental
# (full-refresh and emit records >= *prior state)
# (prior state - frozen state from previous sync, it automatically updates with next sync)
stream_semi_incremental:
$ref: "#/definitions/stream_full_refresh"
incremental_sync:
type: CustomIncrementalSync
class_name: source_intercom.components.IncrementalSingleSlice
class_name: source_intercom.components.IncrementalSingleSliceCursor
cursor_field: "updated_at"
retriever:
$ref: "#/definitions/stream_full_refresh/retriever"
Expand Down Expand Up @@ -201,13 +203,13 @@ definitions:
response_filters:
- http_codes: [ 404 ]
action: IGNORE

# semi-incremental substreams
substream_semi_incremental:
$ref: "#/definitions/stream_full_refresh"
incremental_sync:
type: CustomIncrementalSync
class_name: source_intercom.components.IncrementalSubstreamSlicer
class_name: source_intercom.components.IncrementalSubstreamSlicerCursor
cursor_field: "updated_at"
retriever:
$ref: "#/definitions/stream_full_refresh/retriever"
Expand Down Expand Up @@ -264,7 +266,7 @@ definitions:
$ref: "#/definitions/stream_full_refresh"
incremental_sync:
type: CustomIncrementalSync
class_name: source_intercom.components.IncrementalSingleSlice
class_name: source_intercom.components.IncrementalSingleSliceCursor
cursor_field: "updated_at"
retriever:
$ref: "#/definitions/stream_full_refresh/retriever"
Expand Down Expand Up @@ -297,7 +299,7 @@ definitions:
path: "conversations/search"
data_field: "conversations"
page_size: 150

streams:
- "#/definitions/admins"
- "#/definitions/tags"
Expand All @@ -312,5 +314,5 @@ streams:
- "#/definitions/company_segments"

check:
stream_names:
stream_names:
- "tags"
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@
},
"type": {
"type": ["null", "string"]
},
"team_priority_level": {
"type": ["null", "object"],
"properties": {
"primary_team_ids": {
"type": ["null", "array"],
"items": {
"type": ["null", "integer"]
}
},
"secondary_team_ids": {
"type": ["null", "array"],
"items": {
"type": ["null", "integer"]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"type": "object",
"properties": {
"id": {
"type": ["null", "integer"]
},
"admin_id": {
"type": ["null", "string"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"type": ["null", "object"],
"properties": {
"id": {
"type": ["null", "integer"]
},
"type": {
"type": ["null", "string"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,58 @@
"type": ["null", "boolean"]
}
}
},
"opted_in_subscription_types": {
"type": ["null", "object"],
"properties": {
"type": {
"type": ["null", "string"]
},
"data": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"type": {
"type": ["null", "string"]
},
"id": {
"type": ["null", "string"]
},
"url": {
"type": ["null", "string"]
}
}
}
},
"url": {
"type": ["null", "string"]
},
"total_count": {
"type": ["null", "integer"]
},
"has_more": {
"type": ["null", "boolean"]
}
}
},
"utm_content": {
"type": ["null", "string"]
},
"utm_campaign": {
"type": ["null", "string"]
},
"utm_source": {
"type": ["null", "string"]
},
"referrer": {
"type": ["null", "string"]
},
"utm_term": {
"type": ["null", "string"]
},
"utm_medium": {
"type": ["null", "string"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,34 @@
},
"redacted": {
"type": ["null", "boolean"]
},
"topics": {
"type": ["null", "object"],
"properties": {
"type": {
"type": ["null", "string"]
},
"topics": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"type": {
"type": ["null", "string"]
},
"id": {
"type": ["null", "integer"]
},
"name": {
"type": ["null", "string"]
}
}
}
},
"total_count": {
"type": ["null", "integer"]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
"type": "string",
"description": "Access Token for making authenticated requests.",
"airbyte_secret": true
},
"client_id": {
"title": "Client Id",
"type": "string",
"description": "Client Id for your Intercom application.",
"airbyte_secret": true
},
"client_secret": {
"title": "Client Secret",
"type": "string",
"description": "Client Secret for your Intercom application.",
"airbyte_secret": true
}
}
},
Expand Down
Loading

0 comments on commit 4bd415f

Please sign in to comment.