Skip to content

πŸ› Salesforce Connector: handling 400 error, while sobject doesn't support query or queryAll requests - #9386

Merged
Yevhenii (yevhenii-ldv) merged 5 commits into
masterfrom
ykurochkin/salesforce-400-error-oncall
Jan 11, 2022
Merged

Yevhenii (yevhenii-ldv) merged 5 commits into
masterfrom
ykurochkin/salesforce-400-error-oncall

Conversation

@yevhenii-ldv

@yevhenii-ldv Yevhenii (yevhenii-ldv) commented Jan 10, 2022 •

Copy link
Copy Markdown
Contributor

What

Added error handling when reading streams that do not support requests for query or queryAll from Salesforce API.
Resolves https://github.com/airbytehq/oncall/issues/79

How

Catching errors using the errorCode parameter in the response from Salesforce API

Pre-merge Checklist

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

@github-actions github-actions Bot added the area/connectors Connector related issues label Jan 10, 2022
@yevhenii-ldv

Yevhenii (yevhenii-ldv) commented Jan 10, 2022 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/source-salesforce

πŸ•‘ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1678293992

@octavia-squidington-iii
Octavia Squidington III (octavia-squidington-iii) temporarily deployed to more-secrets January 10, 2022 16:09 Inactive
@yevhenii-ldv

Copy link
Copy Markdown
Contributor Author

I can't run the tests, because the limit on requests for today has run out.

@Zirochkaa

oleh.zorenko (Zirochkaa) commented Jan 11, 2022 •

Copy link
Copy Markdown
Contributor

/test connector=connectors/source-salesforce

πŸ•‘ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681231133
βœ… connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681231133
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               122     29    76%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             57     20    65%
	 source_salesforce/streams.py           222    130    41%
	 source_salesforce/utils.py               8      7    12%
	 --------------------------------------------------------
	 TOTAL                                  434    192    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               122     47    61%
	 source_salesforce/exceptions.py          1      0   100%
	 source_salesforce/rate_limiting.py      22      6    73%
	 source_salesforce/source.py             57     24    58%
	 source_salesforce/streams.py           222     42    81%
	 source_salesforce/utils.py               8      0   100%
	 --------------------------------------------------------
	 TOTAL                                  434    119    73%

@octavia-squidington-iii
Octavia Squidington III (octavia-squidington-iii) temporarily deployed to more-secrets January 11, 2022 07:08 Inactive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's apply changes proposed by Oleh after double-check. And I think, we could merge it.

@github-actions github-actions Bot added the area/documentation Improvements or additions to documentation label Jan 11, 2022
@yevhenii-ldv
Yevhenii (yevhenii-ldv) temporarily deployed to more-secrets January 11, 2022 09:37 Inactive
…urochkin/salesforce-400-error-oncall

οΏ½ Conflicts:
οΏ½	docs/integrations/sources/salesforce.md
@yevhenii-ldv
Yevhenii (yevhenii-ldv) temporarily deployed to more-secrets January 11, 2022 09:44 Inactive
@yevhenii-ldv

Yevhenii (yevhenii-ldv) commented Jan 11, 2022 •

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/source-salesforce

πŸ•‘ connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681805522
βœ… connectors/source-salesforce https://github.com/airbytehq/airbyte/actions/runs/1681805522

@octavia-squidington-iii
Octavia Squidington III (octavia-squidington-iii) temporarily deployed to more-secrets January 11, 2022 09:46 Inactive
@yevhenii-ldv
Yevhenii (yevhenii-ldv) merged commit b5d2410 into master Jan 11, 2022
@yevhenii-ldv
Yevhenii (yevhenii-ldv) deleted the ykurochkin/salesforce-400-error-oncall branch January 11, 2022 10:08
@yevhenii-ldv
Yevhenii (yevhenii-ldv) temporarily deployed to more-secrets January 11, 2022 10:10 Inactive

This branch was previously deployed

1 inactive deployment
more-secrets β€” ca0374a7 Deployed Jan 11, 2022 by yevhenii-ldv
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.

5 participants