Skip to content

🐛 Convex source connector error messages#23797

Merged
Mal Hancock (archangelic) merged 9 commits intoairbytehq:masterfrom
emmaling27:source-logging
May 30, 2023
Merged

🐛 Convex source connector error messages#23797
Mal Hancock (archangelic) merged 9 commits intoairbytehq:masterfrom
emmaling27:source-logging

Conversation

@emmaling27
Copy link
Copy Markdown
Contributor

@emmaling27 Emma Forman Ling (emmaling27) commented Mar 6, 2023

What

This PR adds well-formatted error messages to the Convex source connector. A Convex user encountered unhelpful error messages when their sync failed. This diff adds error messages that should help with debugging.

How

Convex returns HTTP errors as json with the format {'code': ErrorCode, 'message': ErrorMessage}. This diff raises exceptions and formats errors if requests to Convex fail so logs on failed syncs are helpful to folks using Airbyte to connect to Convex.

Recommended reading order

  1. source.py
  2. test_source.py
  3. The rest of are tests that can be read in any order.

🚨 User Impact 🚨

Users should get more helpful error messages that are related to Convex.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

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

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.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here

Passing tests:
Screenshot 2023-03-06 at 3 37 24 PM

@emmaling27 Emma Forman Ling (emmaling27) marked this pull request as ready for review March 6, 2023 23:41
@archangelic
Copy link
Copy Markdown
Contributor

Mal Hancock (archangelic) commented Apr 26, 2023

/test connector=connectors/source-convex

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

Name                        Stmts   Miss  Cover
-----------------------------------------------
source_convex/__init__.py       2      0   100%
source_convex/source.py       110     23    79%
-----------------------------------------------
TOTAL                         112     23    79%

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 TestBasicRead.test_read: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestFullRefresh.test_sequential_reads: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
======================== 34 passed, 3 skipped in 24.61s ========================

@archangelic
Copy link
Copy Markdown
Contributor

Mal Hancock (archangelic) commented Apr 26, 2023

/publish connector=connectors/source-convex

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


Connector Version Did it publish? Were definitions generated?
connectors/source-convex 0.1.1

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

@emmaling27
Copy link
Copy Markdown
Contributor Author

Mal Hancock (@archangelic) I see that tests are failing and now there is a merge conflict. Should I make changes or are you handling it from here?

@archangelic
Copy link
Copy Markdown
Contributor

Mal Hancock (archangelic) commented May 30, 2023

/test connector=connectors/source-convex

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

Name                        Stmts   Miss  Cover
-----------------------------------------------
source_convex/__init__.py       2      0   100%
source_convex/source.py       110     23    79%
-----------------------------------------------
TOTAL                         112     23    79%

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 TestBasicRead.test_read: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestFullRefresh.test_sequential_reads: not found in the config.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
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:594: The previous and actual discovered catalogs are identical.
======================== 33 passed, 5 skipped in 24.73s ========================

@archangelic Mal Hancock (archangelic) merged commit 99a6719 into airbytehq:master May 30, 2023
Marcos Marx (marcosmarxm) pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
* format errors and add test

* update changelog

* lint

* fix for integration tests

* bump versions

* auto-bump connector version

* bump version

---------

Co-authored-by: Mal Hancock <[email protected]>
Co-authored-by: Octavia Squidington III <[email protected]>
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 bounty community connectors/source/convex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants