Skip to content

Commit dfdec66

Browse files
Source Hubspot: enable SAT high strictness (#21775)
* Source Hubspot: enable SAT high strictness * Ignore stream companies for basic read because one of the fields are constantly changing * Ignore streams that change often * Remove contacts stream from empty_streams * Updated expected records * add not empty streams to expected records * Updated expacted records * Added allowedHosts * Skiped property_history stream for basic read * Resolve packages dependecy conflict --------- Co-authored-by: Serhii Lazebnyi <[email protected]> Co-authored-by: Serhii Lazebnyi <[email protected]>
1 parent 369765f commit dfdec66

File tree

6 files changed

+105
-1649
lines changed

6 files changed

+105
-1649
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,9 @@
801801
icon: hubspot.svg
802802
sourceType: api
803803
releaseStage: generally_available
804+
allowedHosts:
805+
hosts:
806+
- api.hubapi.com
804807
- name: IP2Whois
805808
sourceDefinitionId: f23b7b7c-d705-49a3-9042-09add3b104a5
806809
dockerRepository: airbyte/source-ip2whois

airbyte-integrations/connectors/source-hubspot/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ and place them into `secrets/config.json`.
9191
python main.py spec
9292
python main.py check --config secrets/config.json
9393
python main.py discover --config secrets/config.json
94-
python main.py read --config secrets/config.json --catalog sample_files/configured_catalog.json
94+
python main.py read --config secrets/config.json --catalog sample_files/basic_read_catalog.json
9595
```
9696

9797
## Testing
Lines changed: 55 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,69 @@
11
connector_image: airbyte/source-hubspot:dev
2+
test_strictness_level: high
23
acceptance_tests:
34
spec:
45
tests:
5-
- spec_path: "source_hubspot/spec.yaml"
6-
backward_compatibility_tests_config:
7-
# API Key authentication is deleted from authorization choices so it is not backward compatible with previous spec
8-
disable_for_version: "0.2.3"
6+
- spec_path: source_hubspot/spec.yaml
97
connection:
108
tests:
11-
- config_path: "secrets/config.json"
12-
status: "succeed"
13-
- config_path: "integration_tests/invalid_config.json"
14-
status: "failed"
15-
- config_path: "integration_tests/invalid_config_oauth.json"
16-
status: "failed"
17-
- config_path: "integration_tests/invalid_config_wrong_title.json"
18-
status: "failed"
9+
- config_path: secrets/config_oauth.json
10+
status: succeed
11+
- config_path: integration_tests/invalid_config.json
12+
status: failed
13+
- config_path: integration_tests/invalid_config_oauth.json
14+
status: failed
15+
- config_path: integration_tests/invalid_config_wrong_title.json
16+
status: failed
1917
discovery:
2018
tests:
21-
- config_path: "secrets/config.json"
22-
backward_compatibility_tests_config:
23-
# Quote stream is deleted so it is not backward compatible with previous discovery
24-
disable_for_version: "0.2.3"
19+
- config_path: secrets/config_oauth.json
2520
basic_read:
2621
tests:
27-
- config_path: "secrets/config.json"
28-
timeout_seconds: 600
29-
configured_catalog_path: "sample_files/basic_read_oauth_catalog.json"
22+
- config_path: secrets/config_oauth.json
3023
empty_streams:
31-
- name: "form_submissions"
32-
bypass_reason: "unable to populate"
33-
- name: "form_submissions"
34-
bypass_reason: "unable to populate"
35-
- name: "ticket_pipelines"
36-
bypass_reason: "unable to populate"
37-
- name: "engagements_meetings"
38-
bypass_reason: "unable to populate"
39-
- name: "engagements_emails"
40-
bypass_reason: "unable to populate"
41-
- name: "engagements"
42-
bypass_reason: "unable to populate"
43-
- name: "engagements_calls"
44-
bypass_reason: "unable to populate"
45-
- name: "quotes"
46-
bypass_reason: "unable to populate"
47-
# This test commented out, since it produces errors during active testing
48-
# expect_records:
49-
# path: "integration_tests/expected_records.jsonl"
50-
incremental:
51-
tests:
52-
- config_path: "secrets/config.json"
53-
configured_catalog_path: "sample_files/incremental_catalog.json"
54-
future_state:
55-
future_state_path: "integration_tests/abnormal_state.json"
24+
- name: property_history
25+
bypass_reason: has randomly calculated records
26+
- name: form_submissions
27+
bypass_reason: unable to populate
28+
- name: ticket_pipelines
29+
bypass_reason: unable to populate
30+
- name: engagements_meetings
31+
bypass_reason: unable to populate
32+
- name: engagements_emails
33+
bypass_reason: unable to populate
34+
- name: engagements_calls
35+
bypass_reason: unable to populate
36+
- name: quotes
37+
bypass_reason: unable to populate
38+
timeout_seconds: 3600
39+
expect_records:
40+
path: integration_tests/expected_records.jsonl
41+
exact_order: yes
42+
extra_fields: yes
43+
extra_records: no
5644
full_refresh:
5745
tests:
58-
- config_path: "secrets/config.json"
59-
configured_catalog_path: "sample_files/full_refresh_oauth_catalog.json"
46+
- config_path: secrets/config_oauth.json
47+
configured_catalog_path: sample_files/full_refresh_oauth_catalog.json
6048
ignored_fields:
61-
"contact_lists": [ "properties", "ilsFilterBranch" ]
62-
"companies": [ "properties", "hs_time_in_customer" ]
63-
"companies": [ "properties", "hs_time_in_evangelist" ]
64-
"companies": [ "properties", "hs_time_in_lead" ]
65-
"companies": [ "properties", "hs_time_in_marketingqualifiedlead" ]
66-
"companies": [ "properties", "hs_time_in_opportunity" ]
67-
"companies": [ "properties", "hs_time_in_other" ]
68-
"companies": [ "properties", "hs_time_in_salesqualifiedlead" ]
69-
"companies": [ "properties", "hs_time_in_subscriber" ]
70-
"contacts": [ "properties", "hs_time_in_customer" ]
71-
"contacts": [ "properties", "hs_time_in_evangelist" ]
72-
"contacts": [ "properties", "hs_time_in_lead" ]
73-
"contacts": [ "properties", "hs_time_in_marketingqualifiedlead" ]
74-
"contacts": [ "properties", "hs_time_in_opportunity" ]
75-
"contacts": [ "properties", "hs_time_in_other" ]
76-
"contacts": [ "properties", "hs_time_in_salesqualifiedlead" ]
77-
"contacts": [ "properties", "hs_time_in_subscriber" ]
78-
"deals": [ "properties", "hs_time_in_9567448" ]
79-
"deals": [ "properties", "hs_time_in_9567449" ]
80-
"deals": [ "properties", "hs_time_in_appointmentscheduled" ]
81-
"deals": [ "properties", "hs_time_in_closedlost" ]
82-
"deals": [ "properties", "hs_time_in_closedwon" ]
83-
"deals": [ "properties", "hs_time_in_contractsent" ]
84-
"deals": [ "properties", "hs_time_in_customclosedwonstage" ]
85-
"deals": [ "properties", "hs_time_in_decisionmakerboughtin" ]
86-
"deals": [ "properties", "hs_time_in_presentationscheduled" ]
87-
"deals": [ "properties", "hs_time_in_qualifiedtobuy" ]
88-
"tickets": [ "properties", "hs_time_in_1" ]
89-
"tickets": [ "properties", "hs_time_in_2" ]
90-
"tickets": [ "properties", "hs_time_in_3" ]
91-
"tickets": [ "properties", "hs_time_in_4" ]
49+
companies:
50+
- properties
51+
- hs_time_in_subscriber
52+
contact_lists:
53+
- properties
54+
- ilsFilterBranch
55+
contacts:
56+
- properties
57+
- hs_time_in_subscriber
58+
deals:
59+
- properties
60+
- hs_time_in_qualifiedtobuy
61+
tickets:
62+
- properties
63+
- hs_time_in_4
64+
incremental:
65+
tests:
66+
- config_path: secrets/config_oauth.json
67+
configured_catalog_path: sample_files/incremental_catalog.json
68+
future_state:
69+
future_state_path: integration_tests/abnormal_state.json

airbyte-integrations/connectors/source-hubspot/integration_tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@pytest.fixture(scope="session", name="config")
1111
def config_fixture():
12-
with open("secrets/config.json", "r") as config_file:
12+
with open("secrets/config_oauth.json", "r") as config_file:
1313
return json.load(config_file)
1414

1515

0 commit comments

Comments
 (0)