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 Marketo: fix semi incremental streams #15824

Merged

Conversation

davydov-d
Copy link
Collaborator

What

lists and campaigns are semi incremental streams meaning they fetch all available data and then filter it out by its cursor value.
Doing this does not require performing more than one api call per page. Also, we should not ignore start date when filtering the records

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Aug 21, 2022
@davydov-d davydov-d self-assigned this Aug 21, 2022
@davydov-d
Copy link
Collaborator Author

davydov-d commented Aug 21, 2022

/test connector=connectors/source-marketo

🕑 connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2898776664
❌ connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2898776664
🐛 https://gradle.com/s/xaedm3x23im6o

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - AssertionError: All ...
FAILED test_incremental.py::TestIncremental::test_read_sequential_slices[inputs0]
================== 2 failed, 27 passed in 8683.49s (2:24:43) ===================

@davydov-d
Copy link
Collaborator Author

davydov-d commented Aug 22, 2022

/test connector=connectors/source-marketo

🕑 connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2904968545
❌ connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2904968545
🐛 https://gradle.com/s/l25db7sihnjhu

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_stream_slices.py::test_create_export_job - AssertionEr...
	 �[31m=================== �[31m�[1m1 failed�[0m, �[32m25 passed�[0m, �[33m6 warnings�[0m�[31m in 1.32s�[0m�[31m ===================�[0m

@davydov-d
Copy link
Collaborator Author

davydov-d commented Aug 22, 2022

/test connector=connectors/source-marketo

🕑 connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2905124044
❌ connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2905124044
🐛 https://gradle.com/s/vas3kzsvfdixa

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
================== 1 failed, 28 passed in 3226.33s (0:53:46) ===================

@davydov-d
Copy link
Collaborator Author

davydov-d commented Aug 22, 2022

/test connector=connectors/source-marketo

🕑 connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2906287323
✅ connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/2906287323
Python tests coverage:

Name                         Stmts   Miss  Cover
------------------------------------------------
source_marketo/__init__.py       2      0   100%
source_marketo/utils.py         33      7    79%
source_marketo/source.py       273    115    58%
------------------------------------------------
TOTAL                          308    122    60%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          10      4    60%   15-18
	 source_acceptance_test/config.py                        83      6    93%   78-80, 84-86
	 source_acceptance_test/conftest.py                     164    164     0%   6-282
	 source_acceptance_test/plugin.py                        48     48     0%   6-104
	 source_acceptance_test/tests/test_core.py              329    111    66%   39, 50-58, 63-70, 74-75, 79-80, 164, 202-219, 228-236, 240-245, 251, 284-289, 327-334, 374-376, 379, 439-448, 477-478, 484, 487, 520-530, 543-568, 573-577
	 source_acceptance_test/tests/test_full_refresh.py       52      2    96%   34, 65
	 source_acceptance_test/tests/test_incremental.py       121     25    79%   21-23, 29-31, 36-43, 48-61, 208-216
	 source_acceptance_test/utils/asserts.py                 37      2    95%   57-58
	 source_acceptance_test/utils/common.py                  77     17    78%   15-16, 24-30, 47-54, 64, 67
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       110     48    56%   23-26, 32, 36, 39-64, 67-69, 72-74, 77-79, 82-84, 87-89, 92-110, 144-146
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%   30-31, 38, 41, 65-68, 96, 120, 190-192
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1321    463    65%

Build Passed

Test summary info:

All Passed

@davydov-d
Copy link
Collaborator Author

davydov-d commented Aug 23, 2022

/publish connector=connectors/source-marketo

🕑 Publishing the following connectors:
connectors/source-marketo
https://github.com/airbytehq/airbyte/actions/runs/2908942883


Connector Did it publish? Were definitions generated?
connectors/source-marketo

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@davydov-d davydov-d merged commit 43beec3 into master Aug 23, 2022
@davydov-d davydov-d deleted the ddavydov/#15823-source-marketo-fix-semiincremental-streams branch August 23, 2022 06:17
rodireich pushed a commit that referenced this pull request Aug 25, 2022
* #15823 source marketo: fix semi incremental streams

* source marketo - upd changelog

* #15823 fix SATs

* #15823 source marketo: fix tests

* #15823 source marketo: one more test fix

* #15823 source marketo - fix incremental catalog

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/marketo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Marketo: semiincremental streams ignore start date and make redundant requests
3 participants