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

CDK: remove unexpected error swallowing on abstract source's check method #24240

Merged
merged 19 commits into from
Mar 23, 2023

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Mar 20, 2023

What

Closes #23281
We don't want to make unexpected error in check swallowed into a failed Connection Status. We want these error to be handled at a higher level with the uncaught_exception_handler, to emit trace messages.

How

  • Remove the handling of broad exception in check method of the AbstractSource
  • Update CAT to reflect this change
  • Update Airtable's acceptance-test-config.yml to assess the correct behavior of the implementation.

Recommended reading order

  1. elif inputs.status == ConnectionTestConfig.Status.Exception:

🚨 User Impact 🚨

  • All the connectors not handling all Exceptions in an overridden check will emit trace message in case of failure. (This is what we want)

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues CDK Connector Development Kit connectors/source/airtable labels Mar 20, 2023
@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 20, 2023

/test connector=connectors/source-airtable local_cdk=true connector-acceptance-test-version=dev

🕑 connectors/source-airtable https://github.com/airbytehq/airbyte/actions/runs/4469826161
❌ connectors/source-airtable https://github.com/airbytehq/airbyte/actions/runs/4469826161
🐛 https://gradle.com/s/bylkhcxyemgiq

Build Failed

Test summary info:

Could not find result summary

@alafanechere alafanechere requested a review from a team March 20, 2023 15:17
@alafanechere alafanechere marked this pull request as ready for review March 20, 2023 15:17
@alafanechere alafanechere requested a review from a team as a code owner March 20, 2023 15:17
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2023

Affected Connector Report

NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:

  • Run integration tests
  • Bump connector or module version
  • Add changelog
  • Publish the new version

✅ Sources (1)

Connector Version Changelog Publish
source-railz 0.1.1
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Destinations (0)

Connector Version Changelog Publish
  • See "Actionable Items" below for how to resolve warnings and errors.

✅ Other Modules (0)

Actionable Items

(click to expand)

Category Status Actionable Item
Version
mismatch
The version of the connector is different from its normal variant. Please bump the version of the connector.

doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
Changelog
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.

changelog missing
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog.
Publish
not in seed
The connector is not in the seed file (e.g. source_definitions.yaml), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug.

diff seed version
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version.

@evantahler evantahler requested a review from erohmensing March 20, 2023 16:59
@alafanechere
Copy link
Contributor Author

@clnoll I think I'm hitting a edge case while trying to use local CDK and local CAT. When I pass the local_cdk flag the buildDockerfileWithLocalCdk gradle function in airbyte-docker gets called to build CAT. The built image has wrong entrypoint leading to the error you can check in the logs of the /test above:
main.py: error: argument command: invalid choice: 'integration_tests.acceptance' (choose from 'spec', 'check', 'discover', 'read')

@clnoll
Copy link
Contributor

clnoll commented Mar 20, 2023

Thanks for the heads up @alafanechere, fix is incoming in a few.

@clnoll
Copy link
Contributor

clnoll commented Mar 20, 2023

The fix is merged @alafanechere.

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 21, 2023

/test connector=connectors/source-airtable local_cdk=true connector-acceptance-test-version=dev

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

Name                                Stmts   Miss  Cover
-------------------------------------------------------
source_airtable/__init__.py             2      0   100%
source_airtable/streams.py             92      1    99%
source_airtable/source.py              38      1    97%
source_airtable/schema_helpers.py      48      9    81%
source_airtable/auth.py                21     10    52%
-------------------------------------------------------
TOTAL                                 201     21    90%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              487     98    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-498, 511-522, 526-531, 537, 570-575, 613-620, 663-665, 668, 759-762, 767, 824-825, 831, 871-881, 898-899, 901, 919-924
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1751    336    81%

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 syncs 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 [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:512: The previous and actual discovered catalogs are identical.
============= 45 passed, 4 skipped, 1 warning in 114.74s (0:01:54) =============

Copy link
Contributor

@erohmensing erohmensing left a comment

Choose a reason for hiding this comment

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

Thank you for taking this on! Code LGTM, I only wonder about other connectors that might start failing the test and how we want to handle them.

Would also probably be good to get a list of CDK connectors that override check instead of overriding check_connection, since they won't inherit the change - not that we have to fix them here, but would be good to have a list for e.g. GL to look into

Comment on lines 490 to 498
elif inputs.status == ConnectionTestConfig.Status.Exception:
with pytest.raises(ContainerError) as err:
docker_runner.call_check(config=connector_config)

assert err.value.exit_status != 0, "Connector should exit with error code"
assert "Traceback" in err.value.stderr, "Connector should print exception"
output = docker_runner.call_check(config=connector_config, raise_container_error=False)
trace_messages = filter_output(output, Type.TRACE)
assert len(trace_messages) == 1, "A trace message should be emitted in case of unexpected errors"
trace = trace_messages[0].trace
assert isinstance(trace, AirbyteTraceMessage)
assert trace.error is not None
assert trace.error.message is not None
assert trace.error.internal_message is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻 I like this test because it doesn't make any opinions about whether a connection_status message is output, only confirms that a trace message is output. This follows the behavior that I now use in the platform, where if there was a trace message, we declare that there was an error and don't take a connection_status message (if existing) into account. So connectors that currently output both won't fail the test.

Are we concerned about connectors that aren't CDK ones that have the same behavior (e.g. most destinations - not sure if we regularly run CAT on destinations but we could) will suddenly start failing this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is only tested if someone provides a status: "exception" config to test though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this is only tested if someone provides a status: "exception" config to test though

Yes indeed.
I'd love to find a way to create a global not configurable test for this. Because it's unlikely developers will fill in a status: "exception" as they'll rather use status: "fail" to make sure the expected errors are correctly handled.
Do you have a solution in mind to always make check fail in this test context? (Maybe preventing internet access to the container under test?)

Copy link
Contributor

@erohmensing erohmensing Mar 21, 2023

Choose a reason for hiding this comment

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

I believe check currently fails if we pass in a path to a config that doesn't exist (this happens all the time if you haven't written the secrets to storage). We could try to leverage that?

Copy link
Contributor

Choose a reason for hiding this comment

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

E.g. I just ran this locally:

/var/folders/q9/zbmmxqk11tv_jbvdjs428gzm0000gp/T                                                                                                                                    ─╮
❯ docker run airbyte/source-drift:dev check --config blah.txt                                                                                                                       ─╯
{"type": "LOG", "log": {"level": "FATAL", "message": "[Errno 2] No such file or directory: 'blah.txt'\nTraceback (most recent call last):\n  File \"/airbyte/integration_code/main.py\", line 13, in <module>\n    launch(source, sys.argv[1:])\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 131, in launch\n    for message in source_entrypoint.run(parsed_args):\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 85, in run\n    raw_config = self.source.read_config(parsed_args.config)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/connector.py\", line 51, in read_config\n    config = BaseConnector._read_json_file(config_path)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/connector.py\", line 61, in _read_json_file\n    with open(file_path, \"r\") as file:\nFileNotFoundError: [Errno 2] No such file or directory: 'blah.txt'"}}
{"type": "TRACE", "trace": {"type": "ERROR", "emitted_at": 1679409920509.809, "error": {"message": "Something went wrong in the connector. See the logs for more details.", "internal_message": "[Errno 2] No such file or directory: 'blah.txt'", "stack_trace": "Traceback (most recent call last):\n  File \"/airbyte/integration_code/main.py\", line 13, in <module>\n    launch(source, sys.argv[1:])\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 131, in launch\n    for message in source_entrypoint.run(parsed_args):\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 85, in run\n    raw_config = self.source.read_config(parsed_args.config)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/connector.py\", line 51, in read_config\n    config = BaseConnector._read_json_file(config_path)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/connector.py\", line 61, in _read_json_file\n    with open(file_path, \"r\") as file:\nFileNotFoundError: [Errno 2] No such file or directory: 'blah.txt'\n", "failure_type": "system_error"}}}

Copy link
Contributor Author

@alafanechere alafanechere Mar 21, 2023

Choose a reason for hiding this comment

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

Yep this could work. The problem is that test_check relies on the connector_config fixture which is reading the config file. Passing an unexisting config leads to a FileNotFoundError on CAT.
I'll try to create a separate test not using this fixture.

Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, our fixtures are too good to make fake errors 😄

Comment on lines +3 to +5
## 0.7.2
TestConnection: assert that a check with `exception` status emits a trace message.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if this should be bumped differently, as it's a new test we expect some to fail 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only two connectors are using status: "exception" in their acceptance test config (dixa and file). They both are not passing CAT at the moment.
I don't expect additional connectors to fail as only these connectors + airtable will go into the inputs.status == ConnectionTestConfig.Status.Exception: statement.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks for clarifying 👍🏻

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 22, 2023

@erohmensing here's the list of source connectors overriding the check method and swallows all Exceptions in a failed connection status:

source-amazon-sqs 
source-apify-dataset
source-azure-table
source-fauna
source-file
source-firebase-realtime-database
source-firebolt
source-gcs 
source-google-sheets 
source-prestashop
source-sftp-bulk

I created an issue to fix these connectors: https://github.com/airbytehq/airbyte-internal-issues/issues/1538

@alafanechere
Copy link
Contributor Author

@erohmensing I can't find an obvious way to make all the connectors specifically fail at check. I tried to create a test context in which connector container do not have internet access, but this does not work for all connectors as they are not all making HTTP requests in check.
I'll keep the current CAT change but I doubt about its usefulness. As @pedroslopez mentioned in our yesterday meeting: If we can fake an unexpected error it means it's not an unexpected error and we should improve the connector to properly manage these error. I'm pretty confident the CDK is properly handling unexpected error by logging trace messages with the uncaught_exception_handler . This function is already unit tested and manual test validated this behavior.

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

I think the concern of failing tests has been raised by Ella. I'm wondering if there is more problem this compatibility change might incur. In theory, this is a breaking change (a user expecting an AirbyteConnectionStatus will now receive an exception) even though I understand it's probably "soft"

@@ -1,5 +1,8 @@
# Changelog

## 0.31.2
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be done as part of [the CDK release process] to avoid clash with other branches. Same with the changes in airbyte-cdk/python/setup.py

@erohmensing
Copy link
Contributor

@maxi297 FWIW, the breaking part of this is handled so long as you are using airbyte's platform, as I changed the platform to be able to raise trace messages as errors to the user during the check step. When using it via docker, though, I do understand that the behavior changes - however, in docker you don't need the output of check in order to proceed to to the next step (so if you were ignoring that you got a failed check connection and moved on, you still can). The only way I could see this potentially changing someone's workflow significantly is if they had their own UI 🤔

I don't have very strong opinions on the versioning here, I'd be happy with bumping it more too, either one works for me

@erohmensing
Copy link
Contributor

@alafanechere after our chat yesterday I agree about not being able to test for unexpected errors. I think you're right - it probably makes more sense to sunset this option for the test and edit the connector code so that the 2 using "exception" configs lead to "failed" status indicating to the user that something is missing from their config. Id propose we create an issue to do this in a separate pr

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-amazon-ads local_cdk=true

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

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
source_amazon_ads/utils.py                                           22      0   100%
source_amazon_ads/streams/sponsored_products.py                      41      0   100%
source_amazon_ads/streams/sponsored_display.py                       31      0   100%
source_amazon_ads/streams/sponsored_brands.py                        26      0   100%
source_amazon_ads/streams/report_streams/products_report.py          20      0   100%
source_amazon_ads/streams/report_streams/display_report.py           18      0   100%
source_amazon_ads/streams/report_streams/brands_video_report.py      12      0   100%
source_amazon_ads/streams/report_streams/brands_report.py            12      0   100%
source_amazon_ads/streams/report_streams/__init__.py                  5      0   100%
source_amazon_ads/streams/profiles.py                                21      0   100%
source_amazon_ads/streams/attribution_report.py                      81      0   100%
source_amazon_ads/streams/__init__.py                                 7      0   100%
source_amazon_ads/schemas/sponsored_products.py                      37      0   100%
source_amazon_ads/schemas/sponsored_display.py                       31      0   100%
source_amazon_ads/schemas/sponsored_brands.py                        22      0   100%
source_amazon_ads/schemas/profile.py                                 16      0   100%
source_amazon_ads/schemas/attribution_report.py                      21      0   100%
source_amazon_ads/schemas/__init__.py                                 7      0   100%
source_amazon_ads/constants.py                                        1      0   100%
source_amazon_ads/__init__.py                                         2      0   100%
source_amazon_ads/schemas/common.py                                  50      1    98%
source_amazon_ads/source.py                                          48      1    98%
source_amazon_ads/streams/common.py                                  83      2    98%
source_amazon_ads/streams/report_streams/report_streams.py          246     19    92%
-------------------------------------------------------------------------------------
TOTAL                                                               860     23    97%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:509: The previous and actual discovered catalogs are identical.
================== 36 passed, 2 skipped in 480.29s (0:08:00) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-paypal-transaction local_cdk=true

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

Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
source_paypal_transaction/utils.py          8      0   100%
source_paypal_transaction/__init__.py       2      0   100%
source_paypal_transaction/source.py       275     13    95%
-----------------------------------------------------------
TOTAL                                     285     13    95%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:509: The previous and actual discovered catalogs are identical.
================== 37 passed, 2 skipped in 100.79s (0:01:40) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-google-ads local_cdk=true

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

Name                                       Stmts   Miss  Cover
--------------------------------------------------------------
source_google_ads/models.py                   18      0   100%
source_google_ads/__init__.py                  2      0   100%
source_google_ads/utils.py                    56      1    98%
source_google_ads/streams.py                 195      6    97%
source_google_ads/source.py                   95      7    93%
source_google_ads/custom_query_stream.py      54      6    89%
source_google_ads/google_ads.py               73     12    84%
--------------------------------------------------------------
TOTAL                                        493     32    94%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:509: The previous and actual discovered catalogs are identical.
================== 35 passed, 2 skipped in 808.13s (0:13:28) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-pinterest local_cdk=true

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

Name                           Stmts   Miss  Cover
--------------------------------------------------
source_pinterest/utils.py          4      0   100%
source_pinterest/__init__.py       2      0   100%
source_pinterest/source.py       224     18    92%
--------------------------------------------------
TOTAL                            230     18    92%

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.
SKIPPED [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:509: The previous and actual discovered catalogs are identical.
================== 44 passed, 3 skipped in 202.10s (0:03:22) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-zendesk-talk local_cdk=true connector-acceptance-test-version=dev

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

Name                              Stmts   Miss  Cover
-----------------------------------------------------
source_zendesk_talk/__init__.py       2      0   100%
source_zendesk_talk/streams.py      143     12    92%
source_zendesk_talk/source.py        34      3    91%
-----------------------------------------------------
TOTAL                               179     15    92%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              486     97    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-497, 510-521, 525-530, 536, 569-574, 612-619, 662-664, 667, 758-761, 766, 823-824, 830, 870-880, 897-898, 900, 918-923
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1750    335    81%

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.
SKIPPED [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
=================== 44 passed, 3 skipped in 73.71s (0:01:13) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-google-analytics-v4 local_cdk=true connector-acceptance-test-version=dev

🕑 connectors/source-google-analytics-v4 https://github.com/airbytehq/airbyte/actions/runs/4498572411
❌ connectors/source-google-analytics-v4 https://github.com/airbytehq/airbyte/actions/runs/4498572411
🐛 https://gradle.com/s/koexxha6n77t6

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestConnection::test_check[inputs0] - docker.errors.Cont...
FAILED test_core.py::TestConnection::test_check[inputs1] - docker.errors.Cont...
FAILED test_core.py::TestBasicRead::test_read[inputs0] - AssertionError: At l...
FAILED test_full_refresh.py::TestFullRefresh::test_sequential_reads[inputs0]
FAILED test_incremental.py::TestIncremental::test_two_sequential_reads[inputs0]
FAILED test_incremental.py::TestIncremental::test_read_sequential_slices[inputs0]
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
============= 6 failed, 31 passed, 1 skipped in 364.55s (0:06:04) ==============

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-amazon-ads local_cdk=true connector-acceptance-test-version=dev

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

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
source_amazon_ads/utils.py                                           22      0   100%
source_amazon_ads/streams/sponsored_products.py                      41      0   100%
source_amazon_ads/streams/sponsored_display.py                       31      0   100%
source_amazon_ads/streams/sponsored_brands.py                        26      0   100%
source_amazon_ads/streams/report_streams/products_report.py          20      0   100%
source_amazon_ads/streams/report_streams/display_report.py           18      0   100%
source_amazon_ads/streams/report_streams/brands_video_report.py      12      0   100%
source_amazon_ads/streams/report_streams/brands_report.py            12      0   100%
source_amazon_ads/streams/report_streams/__init__.py                  5      0   100%
source_amazon_ads/streams/profiles.py                                21      0   100%
source_amazon_ads/streams/attribution_report.py                      81      0   100%
source_amazon_ads/streams/__init__.py                                 7      0   100%
source_amazon_ads/schemas/sponsored_products.py                      37      0   100%
source_amazon_ads/schemas/sponsored_display.py                       31      0   100%
source_amazon_ads/schemas/sponsored_brands.py                        22      0   100%
source_amazon_ads/schemas/profile.py                                 16      0   100%
source_amazon_ads/schemas/attribution_report.py                      21      0   100%
source_amazon_ads/schemas/__init__.py                                 7      0   100%
source_amazon_ads/constants.py                                        1      0   100%
source_amazon_ads/__init__.py                                         2      0   100%
source_amazon_ads/schemas/common.py                                  50      1    98%
source_amazon_ads/source.py                                          48      1    98%
source_amazon_ads/streams/common.py                                  83      2    98%
source_amazon_ads/streams/report_streams/report_streams.py          246     19    92%
-------------------------------------------------------------------------------------
TOTAL                                                               860     23    97%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              486     97    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-497, 510-521, 525-530, 536, 569-574, 612-619, 662-664, 667, 758-761, 766, 823-824, 830, 870-880, 897-898, 900, 918-923
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1750    335    81%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
================== 36 passed, 2 skipped in 563.62s (0:09:23) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-google-ads local_cdk=true connector-acceptance-test-version=dev

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

Name                                       Stmts   Miss  Cover
--------------------------------------------------------------
source_google_ads/models.py                   18      0   100%
source_google_ads/__init__.py                  2      0   100%
source_google_ads/utils.py                    56      1    98%
source_google_ads/streams.py                 195      6    97%
source_google_ads/source.py                   95      7    93%
source_google_ads/custom_query_stream.py      54      6    89%
source_google_ads/google_ads.py               73     12    84%
--------------------------------------------------------------
TOTAL                                        493     32    94%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              486     97    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-497, 510-521, 525-530, 536, 569-574, 612-619, 662-664, 667, 758-761, 766, 823-824, 830, 870-880, 897-898, 900, 918-923
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1750    335    81%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
================== 35 passed, 2 skipped in 792.66s (0:13:12) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-pinterest local_cdk=true connector-acceptance-test-version=dev

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

Name                           Stmts   Miss  Cover
--------------------------------------------------
source_pinterest/utils.py          4      0   100%
source_pinterest/__init__.py       2      0   100%
source_pinterest/source.py       224     18    92%
--------------------------------------------------
TOTAL                            230     18    92%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              486     97    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-497, 510-521, 525-530, 536, 569-574, 612-619, 662-664, 667, 758-761, 766, 823-824, 830, 870-880, 897-898, 900, 918-923
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1750    335    81%

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.
SKIPPED [2] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
================== 44 passed, 3 skipped in 186.92s (0:03:06) ===================

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-paypal-transaction local_cdk=true connector-acceptance-test-version=dev

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

Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
source_paypal_transaction/utils.py          8      0   100%
source_paypal_transaction/__init__.py       2      0   100%
source_paypal_transaction/source.py       275     13    95%
-----------------------------------------------------------
TOTAL                                     285     13    95%
	 Name                                                    Stmts   Miss  Cover   Missing
	 -------------------------------------------------------------------------------------
	 connector_acceptance_test/base.py                          12      4    67%   16-19
	 connector_acceptance_test/config.py                       152      8    95%   87, 93, 251, 255, 260-261, 266-267
	 connector_acceptance_test/conftest.py                     233    106    55%   38, 44-46, 51, 56, 61, 84, 90, 96-98, 117, 122-124, 130-132, 138-139, 144-145, 150, 161, 170-179, 185-190, 217, 241, 272, 278, 286-294, 306-325, 333-346, 351-357, 364-375, 382-398
	 connector_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 connector_acceptance_test/tests/test_core.py              486     97    80%   55, 60, 99-110, 115-122, 126-127, 131-132, 382, 402, 440, 478-497, 510-521, 525-530, 536, 569-574, 612-619, 662-664, 667, 758-761, 766, 823-824, 830, 870-880, 897-898, 900, 918-923
	 connector_acceptance_test/tests/test_incremental.py       162     14    91%   58-65, 70-83, 252
	 connector_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 connector_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 connector_acceptance_test/utils/compare.py                 64     23    64%   21-51, 68, 101-103
	 connector_acceptance_test/utils/connector_runner.py       134     33    75%   30-33, 53-54, 57-61, 64-65, 80-82, 85-87, 90-92, 95-97, 100-102, 132-133, 167-169, 216
	 connector_acceptance_test/utils/json_schema_helper.py     114     13    89%   31-32, 39, 42, 66-69, 97, 121, 203-205
	 -------------------------------------------------------------------------------------
	 TOTAL                                                    1750    335    81%

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.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:511: The previous and actual discovered catalogs are identical.
================== 37 passed, 2 skipped in 100.62s (0:01:40) ===================

@alafanechere
Copy link
Contributor Author

For google-analytics-v4 the same tests are failing on master so I can say that the failures are not related to my current changes.

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/publish connector=bases/connector-acceptance-test auto-bump-version=false

🕑 Publishing the following connectors:
bases/connector-acceptance-test
https://github.com/airbytehq/airbyte/actions/runs/4498991134


Connector Did it publish? Were definitions generated?
bases/connector-acceptance-test

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

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-marketo local_cdk=true

🕑 connectors/source-marketo https://github.com/airbytehq/airbyte/actions/runs/4499150413

@alafanechere
Copy link
Contributor Author

alafanechere commented Mar 23, 2023

/test connector=connectors/source-alloydb local_cdk=true

🕑 connectors/source-alloydb https://github.com/airbytehq/airbyte/actions/runs/4499153163
❌ connectors/source-alloydb https://github.com/airbytehq/airbyte/actions/runs/4499153163
🐛 https://gradle.com/s/qoe7ntalrrye6

Build Failed

Test summary info:

Could not find result summary

@alafanechere
Copy link
Contributor Author

As Marketo does not finish I tested locally only the connection section of CAT. I made the change to switch failed to exception and the test passed.

@alafanechere alafanechere enabled auto-merge (squash) March 23, 2023 12:42
@alafanechere
Copy link
Contributor Author

@erohmensing @maxi297 I'll merge it now that the impacted GA connectors are not likely to fail at CAT after their acceptance test config updates.
The following connectors required an acceptance-test-config.yml update:

  • source-paypal
  • source-google-analytics-v4
  • source-zendesk-talk
  • source-amazon-ads
  • source-google-ads
  • source-marketo
  • source-pinterest

@alafanechere alafanechere merged commit bad5bce into master Mar 23, 2023
@alafanechere alafanechere deleted the augustin/remove-unexpected-error-swallowing branch March 23, 2023 13:04
@erohmensing
Copy link
Contributor

Thank you @alafanechere !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CDK: remove unexpected error swallowing on abstract source's check method
5 participants