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

Faker emits AirbyteEstimateTraceMessage #19197

Merged
merged 5 commits into from
Nov 15, 2022
Merged

Conversation

evantahler
Copy link
Contributor

@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Nov 9, 2022
@evantahler
Copy link
Contributor Author

evantahler commented Nov 9, 2022

/test connector=connectors/source-faker

🕑 connectors/source-faker https://github.com/airbytehq/airbyte/actions/runs/3424661172
❌ connectors/source-faker https://github.com/airbytehq/airbyte/actions/runs/3424661172
🐛 https://gradle.com/s/yhjjw5yu4e5co

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] - Failed: DID NOT RA...
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
============ 2 failed, 24 passed, 1 skipped, 27 warnings in 25.12s =============

@evantahler
Copy link
Contributor Author

cc @alafanechere can you give me a pointer to how to pass this failing SAT test? Since I'm not really using the CDK tooling, I'm not sure how I'm supposed to exit the container in this case

@alafanechere
Copy link
Contributor

alafanechere commented Nov 14, 2022

Hey @evantahler, the problem was that in case of check failure the returned object was a generator (which is an iterable) because yield was used. And this generator does not have the status attribute accessed downstream.
I was able to make SAT run locally by:

  • Return a status object instead of a generator
  • Change the expected status to be failed instead of exception.
    I also remove the exit(1) instruction.

Are these changes impacting the logic you've been trying to implement in this PR?
Moreover, I don't see anything preventing this connector to use the CDK, which will be better for long term maintenance. (Just changing check to check_connection and discover to streams, with adapted return value, would do the job I think).

@alafanechere
Copy link
Contributor

alafanechere commented Nov 14, 2022

/test connector=connectors/source-faker

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

Name                       Stmts   Miss  Cover
----------------------------------------------
source_faker/__init__.py       2      0   100%
source_faker/source.py       150      7    95%
----------------------------------------------
TOTAL                        152      7    95%
	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       139      5    96%   87, 93, 235, 239-240
	 source_acceptance_test/conftest.py                     196     92    53%   35, 41-43, 48, 54, 60, 66, 72-74, 93, 98-100, 106-108, 114-115, 120-121, 126, 132, 141-150, 156-161, 176, 200, 231, 237, 243-248, 256-261, 269-282, 287-293, 300-311, 318-334
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              345    110    68%   53, 64-72, 77-84, 88-89, 93-94, 178, 216-233, 242-250, 254-259, 265, 298-303, 341-348, 391-393, 396, 461-469, 481-484, 489, 545-546, 552, 555, 591-601, 614-639
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 37      2    95%   57-58
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       112     50    55%   23-26, 32, 36, 39-68, 71-73, 76-78, 81-83, 86-88, 91-93, 96-114, 148-150
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%   30-31, 38, 41, 65-68, 96, 120, 190-192
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1508    348    77%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: not found in the config.
================= 26 passed, 1 skipped, 27 warnings in 27.20s ==================

@evantahler evantahler marked this pull request as ready for review November 14, 2022 17:00
@evantahler
Copy link
Contributor Author

Thank you @alafanechere!

@evantahler
Copy link
Contributor Author

evantahler commented Nov 14, 2022

These changes are not logical changes, other than the emitting of stream size estimates at the beginning of the sync.

Yes, this connector should totally be moved to a more "normal" CDK connector. I made it a long time ago back when I didn't know what I was doing 😇... but that's another PR (#19389)!

@evantahler
Copy link
Contributor Author

evantahler commented Nov 15, 2022

/publish connector=connectors/source-faker

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


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

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

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets November 15, 2022 21:18 Inactive
@evantahler evantahler merged commit 05c99c1 into master Nov 15, 2022
@evantahler evantahler deleted the evan/faker-estimates-4-real branch November 15, 2022 23:58
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* Faker emits `AirbyteEstimateTraceMessage`

* update pr

* fix SAT

* auto-bump connector version

Co-authored-by: alafanechere <augustin.lafanechere@gmail.com>
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/faker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants