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

Publish stream status messages in CDK #24994

Merged
merged 42 commits into from
Apr 26, 2023

Conversation

jdpgrailsdev
Copy link
Contributor

@jdpgrailsdev jdpgrailsdev commented Apr 7, 2023

What

  • Report transitions in status while reading a source

How

Publishes the stream status message on the various transitions in status for each stream in the source. This is a parallel PR to #24971.

Recommended reading order

  1. abstract_source.py
  2. stream_status_utils.py

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Apr 7, 2023
@jdpgrailsdev jdpgrailsdev force-pushed the jonathan/cdk-stream-status-messages branch from 12a5754 to b716aba Compare April 13, 2023 14:43
@jdpgrailsdev jdpgrailsdev changed the title WIP Publish stream status messages in CDK Publish stream status messages in CDK Apr 13, 2023
@jdpgrailsdev
Copy link
Contributor Author

This PR has been updated to use the new protocol message and is now ready for review.

@jdpgrailsdev jdpgrailsdev marked this pull request as ready for review April 13, 2023 20:49
@jdpgrailsdev jdpgrailsdev requested a review from a team as a code owner April 13, 2023 20:49
"airbyte-protocol-models==1.0.0",
"airbyte-protocol-models==0.3.5",
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a downgrade... but I don't think we ever were on v1.0.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. We were never on 1.0.0 even though we set that as the dependency version. The new changes were released as a patch on the current version (0.3), which is the reason for the correction.

…ytehq/airbyte into jonathan/cdk-stream-status-messages
@girarda
Copy link
Contributor

girarda commented Apr 19, 2023

/test connector=connectors/source-stripe local_cdk=1

🕑 connectors/source-stripe https://github.com/airbytehq/airbyte/actions/runs/4748046844
❌ connectors/source-stripe https://github.com/airbytehq/airbyte/actions/runs/4748046844
🐛 https://gradle.com/s/aq2op5ellhazu

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Please check...
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:578: The previous and actual discovered catalogs are identical.
============= 1 failed, 37 passed, 2 skipped in 228.23s (0:03:48) ==============

@girarda
Copy link
Contributor

girarda commented Apr 19, 2023

/test connector=connectors/source-greenhouse local_cdk=1

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

Name                              Stmts   Miss  Cover
-----------------------------------------------------
source_greenhouse/source.py           4      0   100%
source_greenhouse/__init__.py         2      0   100%
source_greenhouse/components.py      68      5    93%
-----------------------------------------------------
TOTAL                                74      5    93%

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:578: The previous and actual discovered catalogs are identical.
================== 47 passed, 3 skipped in 289.49s (0:04:49) ===================

@girarda
Copy link
Contributor

girarda commented Apr 19, 2023

/test connector=connectors/source-facebook-marketing local_cdk=1

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4748592172
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4748592172
🐛 https://gradle.com/s/yuk4xsok4u4ra

Build Failed

Test summary info:

Could not find result summary

@girarda
Copy link
Contributor

girarda commented Apr 20, 2023

/test connector=connectors/source-facebook-marketing local_cdk=1

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4756325339
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4756325339
🐛 https://gradle.com/s/yxxemn63g55fy

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream ads_i...
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:578: The previous and actual discovered catalogs are identical.
============= 1 failed, 37 passed, 2 skipped in 1373.80s (0:22:53) =============

@girarda
Copy link
Contributor

girarda commented Apr 20, 2023

/test connector=connectors/source-facebook-marketing

🕑 connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4756652161
❌ connectors/source-facebook-marketing https://github.com/airbytehq/airbyte/actions/runs/4756652161
🐛 https://gradle.com/s/wyftobx7vcytw

Build Failed

Test summary info:

=========================== short test summary info ============================
FAILED test_core.py::TestBasicRead::test_read[inputs0] - Failed: Stream ads_i...
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:100: The previous and actual specifications are identical.
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:578: The previous and actual discovered catalogs are identical.
============= 2 failed, 36 passed, 2 skipped in 1523.49s (0:25:23) =============

@girarda
Copy link
Contributor

girarda commented Apr 21, 2023

/test connector=connectors/source-greenhouse local_cdk=1

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

Name                              Stmts   Miss  Cover
-----------------------------------------------------
source_greenhouse/source.py           4      0   100%
source_greenhouse/__init__.py         2      0   100%
source_greenhouse/components.py      68      5    93%
-----------------------------------------------------
TOTAL                                74      5    93%

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:578: The previous and actual discovered catalogs are identical.
================== 47 passed, 3 skipped in 323.59s (0:05:23) ===================

Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

:shipit:

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/facebook-marketing labels Apr 25, 2023
@jdpgrailsdev
Copy link
Contributor Author

jdpgrailsdev commented Apr 25, 2023

/test connector=connectors/source-facebook-marketing local_cdk=1

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

Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/utils.py                             26      0   100%
source_facebook_marketing/streams/common.py                    44      0   100%
source_facebook_marketing/streams/async_job.py                217      0   100%
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/spec.py                              42      0   100%
source_facebook_marketing/__init__.py                           5      0   100%
source_facebook_marketing/streams/async_job_manager.py         78      3    96%
source_facebook_marketing/streams/patches.py                   22      2    91%
source_facebook_marketing/api.py                               96      9    91%
source_facebook_marketing/source.py                            61      6    90%
source_facebook_marketing/streams/base_insight_streams.py     145     16    89%
source_facebook_marketing/streams/base_streams.py             143     22    85%
source_facebook_marketing/streams/streams.py                  125     29    77%
-------------------------------------------------------------------------------
TOTAL                                                        1006     87    91%
Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
source_facebook_marketing/streams/__init__.py                   2      0   100%
source_facebook_marketing/__init__.py                           5      0   100%
source_facebook_marketing/spec.py                              42      1    98%
source_facebook_marketing/api.py                               96     12    88%
source_facebook_marketing/streams/patches.py                   22      3    86%
source_facebook_marketing/streams/base_streams.py             143     28    80%
source_facebook_marketing/streams/common.py                    44     16    64%
source_facebook_marketing/utils.py                             26     10    62%
source_facebook_marketing/source.py                            61     24    61%
source_facebook_marketing/streams/streams.py                  125     50    60%
source_facebook_marketing/streams/base_insight_streams.py     145     64    56%
source_facebook_marketing/streams/async_job.py                217    136    37%
source_facebook_marketing/streams/async_job_manager.py         78     60    23%
-------------------------------------------------------------------------------
TOTAL                                                        1006    404    60%

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:578: The previous and actual discovered catalogs are identical.
================== 38 passed, 2 skipped in 1506.80s (0:25:06) ==================

@jdpgrailsdev jdpgrailsdev force-pushed the jonathan/cdk-stream-status-messages branch from d8321ee to 95cffdb Compare April 26, 2023 13:09
@octavia-squidington-iii octavia-squidington-iii removed area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Apr 26, 2023
@jdpgrailsdev
Copy link
Contributor Author

Per a discussion with @alafanechere I have reverted the changelog/version bump to the source-facebook-marketing connector to avoid an order of operation issue between updating and publishing the CDK and publishing the connector. This PR will be merged first and once the CDK has been published, a second PR will be created to publish the source-facebook-marketing connector.

@jdpgrailsdev jdpgrailsdev merged commit 2ebfa45 into master Apr 26, 2023
@jdpgrailsdev jdpgrailsdev deleted the jonathan/cdk-stream-status-messages branch April 26, 2023 14:30
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
* Publish stream status messages in CDK

* Automated Commit - Formatting Changes

* Convert to StreamDescriptor

* Automated Commit - Formatting Changes

* Bump to latest protocol model

* Automated Commit - Formatting Changes

* Bump protocol version

* Add tests for stream status message creation

* Formatting

* Formatting

* Fix failing test

* Actually emit state message

* Automated Commit - Formatting Changes

* Bump airbyte-protocol

* PR feedback

* Fix parameter input

* Correctly yield status message

* PR feedback

* Formatting

* Fix failing tests

* Automated Commit - Formatting Changes

* Revert accidental change

* Automated Change

* Replace STOPPED with COMPLETE/INCOMPLETE

* Update source-facebook-marketing changelog

* Revert "Update source-facebook-marketing changelog"

This reverts commit 709edb8.

---------

Co-authored-by: jdpgrailsdev <jdpgrailsdev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants