Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Chargebee - Implement integration testing for otherwise untested streams [ITAS] #35509

Merged
merged 113 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
18a04a8
Set `additionalProperties` to true fro `custom_fields` object.
pnilan Jan 8, 2024
974cd0c
Updated `invoice` and `transaction` schemas to include missing fields
pnilan Jan 8, 2024
7414f3c
Added missing fields to `credit_note` schema
pnilan Jan 8, 2024
4fbe535
Updated `subscription` schema `plan_unit_price` field for validation …
pnilan Jan 8, 2024
80c2225
Updated `payment_source` for typo in `funding_type` field
pnilan Jan 8, 2024
3e28a13
Updated `credit_note` schema for validation errors
pnilan Jan 8, 2024
e4ca966
Updated `item` and `item_price` schemas for validation errors
pnilan Jan 8, 2024
0400d6a
Added missing fields to `customer` schema
pnilan Jan 8, 2024
0bcca84
Update `customer` stream to account for correct `tax_provider_fields`…
pnilan Jan 9, 2024
c52be59
Updates chargebee changelog for correct date for 0.3.0 release
pnilan Jan 9, 2024
c774d91
Remove enumeration from `entity_type` field for `unbilled_charge` stream
pnilan Jan 9, 2024
41636d5
Chore: Format code
pnilan Jan 9, 2024
94eb58e
Updates Chargebee documentation to reflect current template
pnilan Jan 9, 2024
f7f5305
Updates spec to make Product Catalog an optional input
pnilan Jan 9, 2024
c7a7d4c
Revert `start_date` to required property
pnilan Jan 9, 2024
c5a94e8
Adds suggested streams
pnilan Jan 10, 2024
464053c
Update documentation to better reflect prereqs
pnilan Jan 10, 2024
f46bb6b
Updates connector for inc syncs for gift and site_migration_detail st…
pnilan Jan 11, 2024
f168f15
Updates QL to reflect silver certification
pnilan Jan 16, 2024
eafbeac
Updated date format error in spec.yaml
pnilan Jan 17, 2024
b984d59
Rollback update to `destination_sync_mode` in `configured_catalog`
pnilan Jan 17, 2024
75b25b3
Merge branch 'master' into pnilan/source-chargebee-schema-update
pnilan Jan 17, 2024
439c4b5
Added error handling for `attached_item` stream
pnilan Jan 19, 2024
3b603e8
Removed test bypass for `unbilled_charge` and `hosted_page` streams.
pnilan Jan 19, 2024
12fcfe9
Merge branch 'master' into pnilan/source-chargebee-schema-update
pnilan Jan 19, 2024
dd84c07
Merge branch 'master' into pnilan/source-chargebee-schema-update
pnilan Jan 19, 2024
87d5c93
Add `append + deduped` to supported sync modes in docs
pnilan Jan 19, 2024
2e72df0
Update metadata and changelog for new minor version
pnilan Jan 19, 2024
46b69eb
Merge branch 'pnilan/source-chargebee-schema-update' of github.com:ai…
pnilan Jan 19, 2024
5d7ab98
Update `gift` stream to be full_refresh.
pnilan Jan 19, 2024
b4631d2
Adds inc bypass for `gift` stream because it's full refresh only
pnilan Jan 19, 2024
8e2d4ef
Updated `site_migration_detail` and `unbilled_charge` to be `full_ref…
pnilan Jan 19, 2024
dd4bf85
Added `event` stream bypass for incremental tests due to large datase…
pnilan Jan 22, 2024
ede9fc1
Removed errant records in expected_records
pnilan Jan 22, 2024
b5e0f3c
Adds parent stream foreign key field to `contact` and `quote_line_gro…
pnilan Jan 23, 2024
64a855f
Updated `expected_records` for `contact` and `quote_line_group` strea…
pnilan Jan 23, 2024
1a70c7a
Merge branch 'master' into pnilan/source-chargebee-schema-update
pnilan Jan 23, 2024
cd4cf02
Removed `item_family` records from before `start_date`
pnilan Jan 23, 2024
cec6d54
Removes unnecessary validation in schemas, moves `custom_fields` to s…
pnilan Jan 26, 2024
69116f5
chore: format code
pnilan Jan 26, 2024
68d29df
Sets fail_on_extra_columns to true
pnilan Jan 29, 2024
2328919
Merge branch 'master' into pnilan/source-chargebee-schema-update
pnilan Feb 1, 2024
b47fd5a
Removes `event` from `configured_catalog` -- currently untested and s…
pnilan Feb 1, 2024
94756de
Adds missing fields to schemas
pnilan Feb 2, 2024
3d96563
Adds semi-incremental custom component for unbilled_charge, gift, and…
pnilan Feb 4, 2024
186545d
Merge branch 'pnilan/source-chargebee-semi-inc' into pnilan/source-ch…
pnilan Feb 4, 2024
7bdd9f4
Updates configured_catalog to reflect addition of semi-incremental st…
pnilan Feb 5, 2024
0da8206
Add unit tests for custom semi incremental stream component
pnilan Feb 5, 2024
c7db177
Added test to achieve 90% unit test coverage
pnilan Feb 5, 2024
5105c50
Fixed error in configured catalog
pnilan Feb 5, 2024
0a4ea9f
Adds cursor field parameters to `gift`, `unbilled_charge`, and `site_…
pnilan Feb 5, 2024
e456c74
chore: format code
pnilan Feb 5, 2024
a45de7b
Temp `fail_on_extra_columns = False`
pnilan Feb 5, 2024
6080eb2
Removes `site_migration_detail` stream from configured catalog as it …
pnilan Feb 6, 2024
6cb2040
Set up initial integration test framework
pnilan Feb 6, 2024
61ee749
Add placeholder files for streams to be tested with integration tests
pnilan Feb 6, 2024
dca632e
Added resource json files
pnilan Feb 6, 2024
48bf8d0
Built skeleton for `event` stream integration tests
pnilan Feb 6, 2024
62df063
chore: format code
pnilan Feb 6, 2024
3dee3f0
Moves resource json to resource/http/response/
pnilan Feb 8, 2024
11afab5
Update integration test builders and begin adding tests for event stream
pnilan Feb 12, 2024
2ba3817
Merge branch 'master' into pnilan/source-chargebee-integration-tests
pnilan Feb 12, 2024
2c335b2
Resolve merge conflict
pnilan Feb 12, 2024
bb24e76
Resolve merge conflict
pnilan Feb 12, 2024
da432e0
Added full refresh tests for all streams. Added skeletons for increme…
pnilan Feb 15, 2024
635cfff
Updates transformation integration test for subscription, customer, a…
pnilan Feb 16, 2024
01c5aeb
chore: format code
pnilan Feb 16, 2024
8dac235
Build out incremental tests for virtual_bank_account
pnilan Feb 16, 2024
f6a9a74
Update incremental tests for expected state
pnilan Feb 19, 2024
3f550fd
Merge branch 'master' into pnilan/source-chargebee-integration-tests
pnilan Feb 20, 2024
f49dde4
Updates configured catalog
pnilan Feb 20, 2024
35259f6
Updated check stream
pnilan Feb 20, 2024
27f86d3
chore: format code
pnilan Feb 20, 2024
ca25915
Update virtual_bank_account integration tests for pagination, stream …
pnilan Feb 20, 2024
381d64a
Updates addon integration tests for pagination, incremental tests
pnilan Feb 20, 2024
453532b
Pagination and inc test updates for remaining integration tests
pnilan Feb 20, 2024
98b466e
Remove nonexistent expecting records, bypass hosted_page due to nonpe…
pnilan Feb 20, 2024
c0591c6
Update stream slice format
pnilan Feb 20, 2024
037c6ec
Update integration test query params to match manifest
pnilan Feb 20, 2024
5ce042d
Add hosted page integration tests
pnilan Feb 20, 2024
1df154a
Removes isodate depencency
pnilan Feb 21, 2024
87a8053
Increments version to 0.4.1
pnilan Feb 21, 2024
03de9b1
Adds CustomBackoffStrategy component to override backoff time for tes…
pnilan Feb 21, 2024
df28a69
chore: format code
pnilan Feb 21, 2024
67d07de
Updated integration tests to remote HTTP matching where not needed
pnilan Feb 21, 2024
bbd373d
Adds pytest setup/teardown for deployment_environment, removes refere…
pnilan Feb 22, 2024
6948c59
chore: format code
pnilan Feb 22, 2024
e7602be
Updated pagination integration tests
pnilan Feb 28, 2024
4e7895f
Merge branch 'master' into pnilan/source-chargebee-integration-tests
pnilan Feb 28, 2024
40603f7
Updates CDK to 0.62.X, removes CustomBackoffStrategy component, adds …
pnilan Feb 28, 2024
d25a791
Updated readme changelog date
pnilan Feb 28, 2024
f72402d
Removes errant yaml definition
pnilan Feb 29, 2024
df52e84
Update incremental integration tests for reliability
pnilan Mar 1, 2024
361fc74
Merge branch 'master' into pnilan/source-chargebee-integration-tests
pnilan Mar 1, 2024
2948b8d
Updates CDK to 0.67.1
pnilan Mar 1, 2024
b881fc4
Updates changelog to reflect cdk version
pnilan Mar 1, 2024
5229b5f
Updates changelog date
pnilan Mar 1, 2024
d241e10
Remove erroneous import statements
pnilan Mar 5, 2024
14858a5
Remove `include_deleted` from streams where not supported
pnilan Mar 5, 2024
0dbc165
Update 429 tests to expect config_error
pnilan Mar 5, 2024
a5e9c1f
Updated record extraction test name for clarity
pnilan Mar 5, 2024
f945ff3
Removes `created_at` sorting for coupon stream
pnilan Mar 6, 2024
d4467bf
Update name for record extraction and 500/200 retry test
pnilan Mar 6, 2024
ade282d
Updated 500 error handler test
pnilan Mar 6, 2024
509c8d1
Updates pagination test
pnilan Mar 7, 2024
b82f5be
chore: format code
pnilan Mar 7, 2024
c5ca698
Merge branch 'master' into pnilan/source-chargebee-integration-tests
pnilan Mar 7, 2024
08ee3c9
Updated pagination tests to pass via CI/CD
pnilan Mar 7, 2024
f18b320
Fix freeze_time error
pnilan Mar 7, 2024
b4c62dd
Adds `event` and `site_migration_detail` streams to configured_catalo…
pnilan Mar 12, 2024
1dec3fb
Updated `event` and `site_migration_detail` cursor fields in configur…
pnilan Mar 12, 2024
59e0477
Updated `future_state` for proper cursor fields.
pnilan Mar 13, 2024
d7816a9
Update `acceptance-test-config` bypass descriptions
pnilan Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ acceptance_tests:
- name: "event"
bypass_reason: "Unstable data. Test data is not persistent."
- name: "site_migration_detail"
bypass_reason: "Cannot populate with test data."
bypass_reason: "Cannnot populate with test data."
- name: "hosted_page"
bypass_reason: "Test data is not persistent."
- name: "customer"
bypass_reason: "To be tested with integration tests."
- name: "subscription"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
"supported_sync_modes": ["full_refresh", "incremental"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the configured_catalog show all the streams? There are some I don't see like event and site_migration_detail

"source_defined_cursor": true,
"source_defined_primary_key": [["id"]],
"default_cursor_field": ["created_at"]
"default_cursor_field": ["updated_at"]
maxi297 marked this conversation as resolved.
Show resolved Hide resolved
},
"sync_mode": "incremental",
"destination_sync_mode": "append",
"cursor_field": ["created_at"]
"cursor_field": ["updated_at"]
},
{
"stream": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
{"stream": "item", "data": {"id": "cbdemo_advanced", "name": "Advanced", "external_name": "Advanced", "description": "Uncover hidden insights and carry out deeper analytics for your enterprise with this advanced plan.", "status": "active", "resource_version": 1674035640445, "updated_at": 1674035640, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136879}
{"stream": "item", "data": {"id": "cbdemo_basic", "name": "Basic", "external_name": "Basic", "description": "Starter plan for all your basic reporting requirements.", "status": "active", "resource_version": 1674035673162, "updated_at": 1674035673, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136891}
{"stream": "item", "data": {"id": "cbdemo_intermediary", "name": "Intermediary", "external_name": "Intermediary", "description": "Smart plan with the right mix of basic and slightly advanced reporting tools.", "status": "active", "resource_version": 1674035686971, "updated_at": 1674035686, "item_family_id": "cbdemo_pf_analytics", "type": "plan", "is_shippable": true, "is_giftable": false, "enabled_for_checkout": true, "enabled_in_portal": true, "item_applicability": "all", "metered": false, "channel": "web", "metadata": {}, "object": "item", "custom_fields": []}, "emitted_at": 1678971136900}
{"stream": "attached_item", "data": {"id": "e49c6ed7-9f1b-4c79-9235-549ce8ae9a1f", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_trial_start", "charge_once": false, "created_at": 1674032839, "resource_version": 1674032839573, "updated_at": 1674032839, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569205846}
{"stream": "attached_item", "data": {"id": "25976ccf-8e44-4fce-8eab-2a1658eb0a2b", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_analytics_additionalusers", "type": "mandatory", "status": "active", "quantity": 1, "created_at": 1674032827, "resource_version": 1674032827801, "updated_at": 1674032827, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569205849}
{"stream": "attached_item", "data": {"id": "69b451b1-e00a-4522-ab6f-027586d24b85", "parent_item_id": "cbdemo_basic", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_creation", "charge_once": false, "created_at": 1674032880, "resource_version": 1674032880261, "updated_at": 1674032880, "object": "attached_item", "custom_fields": []}, "emitted_at": 1676569206020}
{"stream": "item_price", "data": {"id": "Test-Plan-1-USD-Daily", "name": "Test Plan 1 USD Daily", "item_family_id": "cbdemo_pf_analytics", "item_id": "Test-Plan-1", "description": "Test", "status": "active", "external_name": "Test Plan 1", "pricing_model": "flat_fee", "price": 1000, "period": 1, "currency_code": "USD", "period_unit": "day", "shipping_period": 1, "shipping_period_unit": "day", "free_quantity": 0, "channel": "web", "resource_version": 1674036400224, "updated_at": 1674036400, "created_at": 1674036400, "invoice_notes": "Test", "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392306}
{"stream": "item_price", "data": {"id": "Test-Gift-Plan-1-USD-Daily", "name": "Test Gift Plan 1 USD Daily", "item_family_id": "cbdemo_pf_crm", "item_id": "Test-Gift-Plan-1", "description": "Test gift", "status": "active", "external_name": "Test Gift Plan 1", "pricing_model": "flat_fee", "price": 1500, "period": 1, "currency_code": "USD", "period_unit": "day", "shipping_period": 1, "shipping_period_unit": "day", "billing_cycles": 1, "free_quantity": 0, "channel": "web", "resource_version": 1674055340456, "updated_at": 1674055340, "created_at": 1674055340, "invoice_notes": "Test gift", "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392312}
{"stream": "item_price", "data": {"id": "Test-Gift-Plan-1-USD-Weekly", "name": "Test Gift Plan 1 USD Weekly", "item_family_id": "cbdemo_pf_crm", "item_id": "Test-Gift-Plan-1", "description": "Test", "status": "active", "external_name": "Test Gift Plan 1", "pricing_model": "flat_fee", "price": 20000, "period": 1, "currency_code": "USD", "period_unit": "week", "shipping_period": 1, "shipping_period_unit": "week", "billing_cycles": 1, "free_quantity": 0, "channel": "web", "resource_version": 1674056134136, "updated_at": 1674056134, "created_at": 1674056134, "is_taxable": true, "item_type": "plan", "show_description_in_invoices": true, "show_description_in_quotes": true, "object": "item_price", "custom_fields": []}, "emitted_at": 1678971392319}
{"stream": "payment_source", "data": {"id": "pm_Azz5jBTTJ96QflvC", "updated_at": 1674057604, "resource_version": 1674057604123, "deleted": false, "object": "payment_source", "customer_id": "Azz5jBTTJ96Mjlv5", "type": "card", "reference_id": "tok_Azz5jBTTJ96QSlvA", "status": "valid", "gateway": "chargebee", "gateway_account_id": "gw_16CKmRSb2oGddH4", "ip_address": "85.209.47.207", "created_at": 1674057604, "card": {"iin": "411111", "last4": "1111", "funding_type": "credit", "expiry_month": 12, "expiry_year": 2029, "masked_number": "************1111", "object": "card", "brand": "visa"}, "custom_fields": []}, "emitted_at": 1678971627515}
Expand Down Expand Up @@ -45,4 +41,7 @@
{"stream": "item_family", "data": {"id": "test-4", "name": "test item family 4", "status": "active", "resource_version": 1705960880668, "updated_at": 1705960880, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929497}
{"stream": "item_family", "data": {"id": "test-3", "name": "test item family 3", "status": "active", "resource_version": 1705956309899, "updated_at": 1705956309, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929501}
{"stream": "item_family", "data": {"id": "test-2", "name": "test item family 2", "status": "active", "resource_version": 1705956286577, "updated_at": 1705956286, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929506}
{"stream": "item_family", "data": {"id": "test-1", "name": "test item family 1", "status": "active", "resource_version": 1705956260965, "updated_at": 1705956260, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929509}
{"stream": "item_family", "data": {"id": "test-1", "name": "test item family 1", "status": "active", "resource_version": 1705956260965, "updated_at": 1705956260, "object": "item_family", "custom_fields": []}, "emitted_at": 1705960929509}
{"stream": "attached_item", "data": {"id": "25976ccf-8e44-4fce-8eab-2a1658eb0a2b", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_analytics_additionalusers", "type": "mandatory", "status": "active", "quantity": 1, "created_at": 1674032827, "resource_version": 1674032827801, "updated_at": 1674032827, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907178}
{"stream": "attached_item", "data": {"id": "e49c6ed7-9f1b-4c79-9235-549ce8ae9a1f", "parent_item_id": "cbdemo_advanced", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_trial_start", "charge_once": false, "created_at": 1674032839, "resource_version": 1674032839573, "updated_at": 1674032839, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907177}
{"stream": "attached_item", "data": {"id": "69b451b1-e00a-4522-ab6f-027586d24b85", "parent_item_id": "cbdemo_basic", "item_id": "cbdemo_setup_charge", "status": "active", "charge_on_event": "subscription_creation", "charge_once": false, "created_at": 1674032880, "resource_version": 1674032880261, "updated_at": 1674032880, "object": "attached_item", "custom_fields": []}, "emitted_at": 1708468907297}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"stream_descriptor": { "name": "item" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 2147483647 },
"stream_descriptor": { "name": "attached_item" }
}
},
{
"type": "STREAM",
"stream": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"stream_descriptor": { "name": "item" }
}
},
{
"type": "STREAM",
"stream": {
"stream_state": { "updated_at": 1625596058 },
"stream_descriptor": { "name": "attached_item" }
}
},
{
"type": "STREAM",
"stream": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 686473f1-76d9-4994-9cc7-9b13da46147c
dockerImageTag: 0.4.0
dockerImageTag: 0.4.1
dockerRepository: airbyte/source-chargebee
documentationUrl: https://docs.airbyte.com/integrations/sources/chargebee
githubIssueLabel: source-chargebee
Expand Down
70 changes: 42 additions & 28 deletions airbyte-integrations/connectors/source-chargebee/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "0.4.0"
version = "0.4.1"
name = "source-chargebee"
description = "Source implementation for Chargebee."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand All @@ -17,7 +17,8 @@ include = "source_chargebee"

[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = "==0.58.1"
airbyte-cdk = "^0.67.1"
pnilan marked this conversation as resolved.
Show resolved Hide resolved
freezegun = "^1.4.0"

[tool.poetry.scripts]
source-chargebee = "source_chargebee.run:run"
Expand Down
Loading
Loading