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 Google Sheets: handle config errors #26097

Merged
merged 9 commits into from
May 16, 2023

Conversation

artem1205
Copy link
Collaborator

What

Resolve #25691

How

change error message and type to config_error

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

no breaking changes

Pre-merge Actions

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Unit & integration tests added

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.

@github-actions
Copy link
Contributor

github-actions bot commented May 15, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan and you've followed all steps in the Breaking Changes Checklist
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • You, or an Airbyter, have run /test successfully on this PR - or on a non-forked branch
  • You, or an Airbyter, have run /publish successfully on this PR - or on a non-forked branch
  • You've updated the connector's metadata.yaml file new!

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label May 15, 2023
@artem1205
Copy link
Collaborator Author

artem1205 commented May 15, 2023

/test connector=connectors/source-google-sheets

🕑 connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4985548905
❌ connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4985548905
🐛 https://gradle.com/s/vbpai2etjwhzc

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestConnection::test_check[inputs3] - docker.errors.Cont...
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: Incremental sync are not supported on this connector
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:578: The previous and actual discovered catalogs are identical.
============= 1 failed, 36 passed, 3 skipped in 109.14s (0:01:49) ==============

@artem1205
Copy link
Collaborator Author

artem1205 commented May 16, 2023

/test connector=connectors/source-google-sheets

🕑 connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4990004231
✅ connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4990004231
Python tests coverage:

Name                                                Stmts   Miss  Cover
-----------------------------------------------------------------------
source_google_sheets/models/spreadsheet_values.py      12      0   100%
source_google_sheets/models/spreadsheet.py             34      0   100%
source_google_sheets/models/__init__.py                 2      0   100%
source_google_sheets/__init__.py                        2      0   100%
source_google_sheets/utils.py                          23      1    96%
source_google_sheets/helpers.py                       145     27    81%
source_google_sheets/client.py                         23      6    74%
source_google_sheets/source.py                        115     90    22%
-----------------------------------------------------------------------
TOTAL                                                 356    124    65%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: Incremental sync are not supported on this connector
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:578: The previous and actual discovered catalogs are identical.
================== 37 passed, 3 skipped in 148.65s (0:02:28) ===================

Copy link
Collaborator

@lazebnyi lazebnyi left a comment

Choose a reason for hiding this comment

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

LGTM. Need add unit tests.

status=Status.FAILED, message=f"Unable to connect with the provided credentials to spreadsheet. Error: {reason}"
)
message += "The spreadsheet link is not valid. Enter the URL of the Google spreadsheet you want to sync."
raise AirbyteTracedException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add unit tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tests added

@artem1205
Copy link
Collaborator Author

artem1205 commented May 16, 2023

/test connector=connectors/source-google-sheets

🕑 connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4994010262
✅ connectors/source-google-sheets https://github.com/airbytehq/airbyte/actions/runs/4994010262
Python tests coverage:

Name                                                Stmts   Miss  Cover
-----------------------------------------------------------------------
source_google_sheets/models/spreadsheet_values.py      12      0   100%
source_google_sheets/models/spreadsheet.py             34      0   100%
source_google_sheets/models/__init__.py                 2      0   100%
source_google_sheets/__init__.py                        2      0   100%
source_google_sheets/utils.py                          23      1    96%
source_google_sheets/helpers.py                       145     21    86%
source_google_sheets/client.py                         23      5    78%
source_google_sheets/source.py                        115     75    35%
-----------------------------------------------------------------------
TOTAL                                                 356    102    71%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: Incremental sync are not supported on this connector
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:578: The previous and actual discovered catalogs are identical.
================== 37 passed, 3 skipped in 132.76s (0:02:12) ===================

@artem1205
Copy link
Collaborator Author

artem1205 commented May 16, 2023

/publish connector=connectors/source-google-sheets

🕑 Publishing the following connectors:
connectors/source-google-sheets
https://github.com/airbytehq/airbyte/actions/runs/4995048031


Connector Version Did it publish? Were definitions generated?
connectors/source-google-sheets 0.2.38

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

…rs-25691

# Conflicts:
#	airbyte-config-oss/init-oss/src/main/resources/seed/oss_catalog.json
#	airbyte-config-oss/init-oss/src/main/resources/seed/source_definitions.yaml
#	airbyte-config-oss/init-oss/src/main/resources/seed/source_specs.yaml
@artem1205 artem1205 merged commit 0eefa33 into master May 16, 2023
15 of 17 checks passed
@artem1205 artem1205 deleted the artem1205/source-google-sheets-config-errors-25691 branch May 16, 2023 22:14
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
* Source Google Sheets: handle config errors

* Source Google Sheets: update docs

* Source Google Sheets: fix test

* Source Google Sheets: add unit tests

* auto-bump connector version

* Automated Change

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
Co-authored-by: artem1205 <artem1205@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/google-sheets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Categorize Google Sheets config errors
3 participants