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 Salesforce: Deprecate API Type parameter #9302

Merged
merged 16 commits into from
Jan 19, 2022

Conversation

augan-rymkhan
Copy link
Contributor

@augan-rymkhan augan-rymkhan commented Jan 5, 2022

What

Resolves issue

How

For the initial sync (without state), always use BULK API, where it's possible (Some streams don't support BULK API, for them always use REST). For the subsequent incremental syncs (when state is provided), use REST API.

Recommended reading order


This change is Reviewable

@github-actions github-actions bot added the area/connectors Connector related issues label Jan 5, 2022
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 5, 2022 05:25 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 8, 2022 06:19 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 10, 2022 10:21 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 10, 2022 12:04 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 11, 2022 06:22 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 11, 2022

/test connector=connectors/source-salesforce

🕑 connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681121510
❌ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681121510
🐛 https://gradle.com/s/qsepmnhhhm4dm

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 11, 2022 06:28 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 12, 2022 06:15 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 12, 2022

/test connector=connectors/source-salesforce

🕑 connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1686226583
❌ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1686226583
🐛 https://gradle.com/s/p6a4hwleaopfy

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 12, 2022 06:21 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 12, 2022 08:32 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 12, 2022

/test connector=connectors/source-salesforce

🕑 connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1686646717
❌ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1686646717
🐛 https://gradle.com/s/vpxrizvmehr5e
Python short test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestSpec::test_match_expected[inputs0] - jsonschema.exce...
FAILED test_core.py::TestConnection::test_check[inputs0] - docker.errors.Cont...
FAILED test_core.py::TestDiscovery::test_discover[inputs0] - docker.errors.Co...
ERROR test_core.py::TestDiscovery::test_defined_cursors_exist_in_schema[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_refs_exist_in_schema[inputs0]
ERROR test_core.py::TestBasicRead::test_read[inputs0] - docker.errors.Contain...
ERROR test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
ERROR test_incremental.py::TestIncremental::test_two_sequential_reads[inputs0]
ERROR test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
==================== 3 failed, 7 passed, 6 errors in 10.87s ====================

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 12, 2022 08:38 Inactive
@augan-rymkhan augan-rymkhan changed the title use BULK for the first sync, REST for incremental sync Source Salesforce: Deprecating API Type parameter Jan 13, 2022
@augan-rymkhan augan-rymkhan changed the title Source Salesforce: Deprecating API Type parameter Source Salesforce: Deprecate API Type parameter Jan 13, 2022
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 14, 2022 12:09 Inactive
@@ -5,7 +5,7 @@
"title": "Salesforce Source Spec",
"type": "object",
"required": ["client_id", "client_secret", "refresh_token"],
"additionalProperties": false,
"additionalProperties": true,
Copy link
Contributor Author

@augan-rymkhan augan-rymkhan Jan 14, 2022

Choose a reason for hiding this comment

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

Set it to true because api_type parameter is removed from the spec but it is provided on config files. It's temporary solution not to fail checks.

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 14, 2022 18:02 Inactive
@augan-rymkhan augan-rymkhan marked this pull request as ready for review January 17, 2022 08:50
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 17, 2022 08:55 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 17, 2022 09:04 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 17, 2022

/test connector=connectors/source-salesforce

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              242     96    60%
	 source_acceptance_test/tests/test_full_refresh.py       38      0   100%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  54     17    69%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py     115     14    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                  979    404    59%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                 Stmts   Miss  Cover
	 --------------------------------------------------------
	 source_salesforce/__init__.py            2      0   100%
	 source_salesforce/api.py               118     30    75%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             60     20    67%
	 source_salesforce/streams.py           218    126    42%
	 source_salesforce/utils.py               8      7    12%
	 --------------------------------------------------------
	 TOTAL                                  429    189    56%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                 Stmts   Miss  Cover
	 --------------------------------------------------------
	 source_salesforce/__init__.py            2      0   100%
	 source_salesforce/api.py               118     42    64%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             60     25    58%
	 source_salesforce/streams.py           218     44    80%
	 source_salesforce/utils.py               8      0   100%
	 --------------------------------------------------------
	 TOTAL                                  429    117    73%

@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 19, 2022 09:08 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 19, 2022

/test connector=connectors/source-salesforce

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              242     96    60%
	 source_acceptance_test/tests/test_full_refresh.py       38      0   100%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  54     17    69%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py     115     14    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                  979    404    59%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                 Stmts   Miss  Cover
	 --------------------------------------------------------
	 source_salesforce/__init__.py            2      0   100%
	 source_salesforce/api.py               118     30    75%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             60     20    67%
	 source_salesforce/streams.py           235    142    40%
	 source_salesforce/utils.py               8      7    12%
	 --------------------------------------------------------
	 TOTAL                                  446    205    54%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                 Stmts   Miss  Cover
	 --------------------------------------------------------
	 source_salesforce/__init__.py            2      0   100%
	 source_salesforce/api.py               118     42    64%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             60     25    58%
	 source_salesforce/streams.py           235     41    83%
	 source_salesforce/utils.py               8      0   100%
	 --------------------------------------------------------
	 TOTAL                                  446    114    74%

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 19, 2022 09:12 Inactive
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Jan 19, 2022
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets January 19, 2022 09:30 Inactive
@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Jan 19, 2022

/publish connector=connectors/source-salesforce

🕑 connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1717351650
✅ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1717351650

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 19, 2022 10:03 Inactive
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate Deprecating API Type parameter in Source Salesforce
5 participants