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 Amplitude: add error descriptions and fix events stream fail on 404 #12430

Merged
merged 5 commits into from
Apr 28, 2022

Conversation

bazarnov
Copy link
Collaborator

@bazarnov bazarnov commented Apr 28, 2022

What

Resolving:
#10220
#7900

How

  • added error_msg_from_status method to log the http errors correctly
  • adjusted unit_tests to cover the case

🚨 User Impact 🚨

No impact expected.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • 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
    • 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

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@a33cbf6). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #12430   +/-   ##
=========================================
  Coverage          ?   66.48%           
=========================================
  Files             ?        4           
  Lines             ?      185           
  Branches          ?        0           
=========================================
  Hits              ?      123           
  Misses            ?       62           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a33cbf6...e16aa40. Read the comment docs.

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Apr 28, 2022
@bazarnov
Copy link
Collaborator Author

bazarnov commented Apr 28, 2022

/test connector=connectors/source-amplitude

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

Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        74      6    92%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/utils/common.py                  80     17    79%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/tests/test_core.py              285    106    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
source_acceptance_test/tests/test_incremental.py        69     38    45%
------------------------------------------------------------------------
TOTAL                                                  896    259    71%
Name                           Stmts   Miss  Cover
--------------------------------------------------
source_amplitude/__init__.py       2      0   100%
source_amplitude/errors.py        12      1    92%
source_amplitude/api.py          147     49    67%
source_amplitude/source.py        24     12    50%
--------------------------------------------------
TOTAL                            185     62    66%

Python short test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:21: `future_state_path` not specified, skipping
=================== 21 passed, 1 skipped in 73.76s (0:01:13) ===================

@bazarnov bazarnov temporarily deployed to more-secrets April 28, 2022 10:52 Inactive
@bazarnov bazarnov temporarily deployed to more-secrets April 28, 2022 10:52 Inactive
@bazarnov
Copy link
Collaborator Author

bazarnov commented Apr 28, 2022

/publish connector=connectors/source-amplitude

🕑 connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2238873871
🚀 Successfully published connectors/source-amplitude
🚀 Auto-bumped version for connectors/source-amplitude
✅ connectors/source-amplitude https://github.com/airbytehq/airbyte/actions/runs/2238873871

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets April 28, 2022 11:20 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets April 28, 2022 11:20 Inactive
@bazarnov bazarnov merged commit fd4b71e into master Apr 28, 2022
@bazarnov bazarnov deleted the bazarnov/10220-source-amplitude-fix-events-stream branch April 28, 2022 11:57
@klsoper
Copy link
Contributor

klsoper commented May 11, 2022

Hi @bazarnov - it looks like this has broken some syncs on cloud that were previously working.

2022-05-11 12:14:51 �[44msource�[0m > Encountered an exception while reading stream events
2022-05-11 12:14:53 �[43mdestination�[0m > java.lang.RuntimeException: com.google.cloud.bigquery.BigQueryException: 404 Not Found

Cc @edgao because he is on call -not sure if this is a quick fix. Happy to create an alpha-beta issue to look into this further too if needed. I can slack you the workspace and connection link if you need.

@edgao
Copy link
Contributor

edgao commented May 11, 2022

@evantahler fyi as current oc (schedule got updated yesterday, if hubot still says I'm oc then that's a bug)

@evantahler
Copy link
Contributor

Hi @klsoper let's make a new alpha-beta issue for this! The connection between a BigQueryException and these Amplitude connector fixes is probably something to discuss!

@klsoper
Copy link
Contributor

klsoper commented May 12, 2022

@evantahler Thank you- just got one going!

@mohitreddy1996
Copy link
Contributor

Hi, since this seems to be the latest heavy change for Amplitude connector, looking for some help/resolution here - #13057

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
7 participants