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 Github - added user friendly messages, added AirbyteTracedException config_error #23467

Merged
merged 20 commits into from
Mar 3, 2023

Conversation

midavadim
Copy link
Contributor

@midavadim midavadim commented Feb 26, 2023

What

added user friendly messages, added AirbyteTracedException config_error

SAT fixes:

  • added only one record for each stream in expected records
  • removed empty streams config for repositores and organization streams
  • added ignore fields for repositores and organization streams

How

SAT fixes:

  • added only one record for each stream in expected records
  • removed empty streams config for repositores and organization streams
  • added ignore fields for repositores and organization streams

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? 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
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • 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 by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here
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
Connector Generator
  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed

@CLAassistant
Copy link

CLAassistant commented Feb 26, 2023

CLA assistant check
All committers have signed the CLA.

@midavadim
Copy link
Contributor Author

midavadim commented Feb 26, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4277147091
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4277147091
🐛 https://gradle.com/s/p4gxb6iz6l4oo

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream workf...
FAILED test_incremental.py::TestIncremental::test_read_sequential_slices[inputs0]
FAILED test_incremental.py::TestIncremental::test_state_with_abnormally_large_values[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:98: The previous and actual specifications are identical.
SKIPPED [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:507: The previous and actual discovered catalogs are identical.
============= 3 failed, 41 passed, 3 skipped in 2577.09s (0:42:57) =============

@midavadim midavadim requested a review from lazebnyi February 27, 2023 13:14
@midavadim
Copy link
Contributor Author

midavadim commented Feb 27, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4283105858
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4283105858
🐛 https://gradle.com/s/cdnysoxef3q7o

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream workf...
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:98: The previous and actual specifications are identical.
SKIPPED [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:507: The previous and actual discovered catalogs are identical.
============= 1 failed, 43 passed, 3 skipped in 345.45s (0:05:45) ==============

@midavadim
Copy link
Contributor Author

midavadim commented Feb 27, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4284988032
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4284988032
🐛 https://gradle.com/s/z2vqgh2fszbv6

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestConnection::test_check[inputs0] - Failed: Timeout >3...
FAILED test_core.py::TestConnection::test_check[inputs1] - Failed: Timeout >3...
FAILED test_core.py::TestDiscovery::test_discover[inputs0] - Failed: Timeout ...
FAILED test_core.py::TestDiscovery::test_discover[inputs1] - Failed: Timeout ...
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream workf...
FAILED test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
ERROR test_core.py::TestDiscovery::test_defined_cursors_exist_in_schema[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:98: The previous and actual specifications are identical.
========= 6 failed, 39 passed, 1 skipped, 1 error in 550.39s (0:09:10) =========

@midavadim
Copy link
Contributor Author

midavadim commented Feb 27, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4285774502
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4285774502
🐛 https://gradle.com/s/btrowfi4szlzu

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream workf...
FAILED test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:98: The previous and actual specifications are identical.
============= 2 failed, 44 passed, 1 skipped in 956.17s (0:15:56) ==============

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.

Please check expected records. Look like you can use ignored fields for basic read instead of empty streams.

@midavadim
Copy link
Contributor Author

midavadim commented Mar 1, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4307610737
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4307610737
🐛 https://gradle.com/s/32srnzavu37ku

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream organ...
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
============= 1 failed, 45 passed, 1 skipped in 357.88s (0:05:57) ==============

@midavadim
Copy link
Contributor Author

midavadim commented Mar 2, 2023

/test connector=connectors/source-github

🕑 connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4313630170
❌ connectors/source-github https://github.com/airbytehq/airbyte/actions/runs/4313630170
🐛 https://gradle.com/s/teqypennk6gk2

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream organ...
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
============= 1 failed, 45 passed, 1 skipped in 340.51s (0:05:40) ==============

@midavadim
Copy link
Contributor Author

midavadim commented Mar 2, 2023

/test connector=connectors/source-github

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

Name                             Stmts   Miss  Cover
----------------------------------------------------
source_github/utils.py              14      0   100%
source_github/github_schema.py    8807      0   100%
source_github/__init__.py            2      0   100%
source_github/streams.py           854     91    89%
source_github/graphql.py           167     22    87%
source_github/source.py            118     34    71%
----------------------------------------------------
TOTAL                             9962    147    99%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
================== 46 passed, 1 skipped in 369.80s (0:06:09) ===================

@midavadim midavadim requested a review from lazebnyi March 2, 2023 14:58
@lazebnyi lazebnyi requested a review from evantahler March 3, 2023 01:02
Copy link
Contributor

@evantahler evantahler left a comment

Choose a reason for hiding this comment

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

Nice!

[optional] Should we publish a new version of the connector?

@@ -70,3 +103,38 @@ acceptance_tests:
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
ignored_fields:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this means we are sampling a popular repository in our tests. I think that the tradeoff is worth it - information in more stable streams (organizations, repositories) is ignored to get us juicier problems in PRs and issues.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Mar 3, 2023
@midavadim
Copy link
Contributor Author

midavadim commented Mar 3, 2023

/publish connector=connectors/source-github

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


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

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

@midavadim midavadim enabled auto-merge (squash) March 3, 2023 18:07
@midavadim midavadim merged commit 1b2b039 into master Mar 3, 2023
@midavadim midavadim deleted the midavadim/18450-source-github-config-error branch March 3, 2023 18:32
jbfbell pushed a commit that referenced this pull request Mar 6, 2023
…ception config_error (#23467)

* added user friendly messages, added AirbyteTracedException config_error

* added formatting

* fixed 'if' condition

* removed HTTPError words from error examples

* changed http to https for all schemas

* removed http adapter

* updated expected record file - one record for each stream

* updated expected record file

* updated expected record file

* bumped connector version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
danielduckworth pushed a commit to danielduckworth/airbyte that referenced this pull request Mar 13, 2023
…ception config_error (airbytehq#23467)

* added user friendly messages, added AirbyteTracedException config_error

* added formatting

* fixed 'if' condition

* removed HTTPError words from error examples

* changed http to https for all schemas

* removed http adapter

* updated expected record file - one record for each stream

* updated expected record file

* updated expected record file

* bumped connector version

* auto-bump connector version

---------

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/github
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source github: raise config_error if config's credentials do not have access to the requested resource
5 participants