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 Delighted: output only records in which cursor field is greater than the value in state for incremental streams #9550

Merged
merged 5 commits into from
Jan 31, 2022

Conversation

Zirochkaa
Copy link
Contributor

@Zirochkaa Zirochkaa commented Jan 17, 2022

Bug-fix Request

Fixes #9551.


Reason

Link to message with details is here.
The Delighted API supports since or updated_since parameters and they require Unix timestamp in order to restrict responses to those updated on or after this time. So, for example, if we send since=1641289583 this means that records which were created at 1641289583 or later will be returned.

Confirmation

  • Was reproduced locally

How does the code change in the PR fix the issue?

Filter records in python code and output records in which cursor field value is greater then value in state.


@Zirochkaa Zirochkaa self-assigned this Jan 17, 2022
@github-actions github-actions bot added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Jan 17, 2022
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 17, 2022

/test connector=source-delighted

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              242     96    60%
	 source_acceptance_test/tests/test_full_refresh.py       38      0   100%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  54     17    69%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py     115     14    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                  979    404    59%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                       Stmts   Miss  Cover
	 --------------------------------------------------------------
	 base_python/__init__.py                       13      0   100%
	 base_python/catalog_helpers.py                10      6    40%
	 base_python/cdk/__init__.py                    0      0   100%
	 base_python/cdk/abstract_source.py            89     64    28%
	 base_python/cdk/streams/__init__.py            0      0   100%
	 base_python/cdk/streams/auth/__init__.py       0      0   100%
	 base_python/cdk/streams/auth/core.py           8      1    88%
	 base_python/cdk/streams/auth/jwt.py            5      5     0%
	 base_python/cdk/streams/auth/oauth.py         37     26    30%
	 base_python/cdk/streams/auth/token.py          9      4    56%
	 base_python/cdk/streams/core.py               63     32    49%
	 base_python/cdk/streams/exceptions.py         10      2    80%
	 base_python/cdk/streams/http.py               67     33    51%
	 base_python/cdk/streams/rate_limiting.py      30     14    53%
	 base_python/cdk/utils/__init__.py              0      0   100%
	 base_python/cdk/utils/casing.py                4      0   100%
	 base_python/cdk/utils/event_timing.py         47      3    94%
	 base_python/client.py                         56     33    41%
	 base_python/entrypoint.py                     70     56    20%
	 base_python/integration.py                    52     25    52%
	 base_python/logger.py                         33     15    55%
	 base_python/schema_helpers.py                 56     41    27%
	 base_python/source.py                         51     34    33%
	 main_dev.py                                    3      3     0%
	 --------------------------------------------------------------
	 TOTAL                                        713    397    44%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                           Stmts   Miss  Cover
	 --------------------------------------------------
	 --------------------------------------------------/actions-runner/_work/airbyte/airbyte/airbyte-integrations/connectors/source-delighted/.venv/lib/python3.8/site-packages/coverage/control.py:768: CoverageWarning: No data was collected. (no-data-collected)
	 source_delighted/__init__.py       2      2     0%
	   self._warn("No data was collected.", slug="no-data-collected")
	 source_delighted/source.py        95     95     0%
	 --------------------------------------------------
	 TOTAL                             97     97     0%

@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 17, 2022 13:16 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 17, 2022 13:18 Inactive
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 18, 2022

/test connector=source-delighted

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              242     96    60%
	 source_acceptance_test/tests/test_full_refresh.py       38      0   100%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  54     17    69%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py     115     14    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                  979    404    59%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                       Stmts   Miss  Cover
	 --------------------------------------------------------------
	 base_python/__init__.py                       13      0   100%
	 base_python/catalog_helpers.py                10      6    40%
	 base_python/cdk/__init__.py                    0      0   100%
	 base_python/cdk/abstract_source.py            89     64    28%
	 base_python/cdk/streams/__init__.py            0      0   100%
	 base_python/cdk/streams/auth/__init__.py       0      0   100%
	 base_python/cdk/streams/auth/core.py           8      1    88%
	 base_python/cdk/streams/auth/jwt.py            5      5     0%
	 base_python/cdk/streams/auth/oauth.py         37     26    30%
	 base_python/cdk/streams/auth/token.py          9      4    56%
	 base_python/cdk/streams/core.py               63     32    49%
	 base_python/cdk/streams/exceptions.py         10      2    80%
	 base_python/cdk/streams/http.py               67     33    51%
	 base_python/cdk/streams/rate_limiting.py      30     14    53%
	 base_python/cdk/utils/__init__.py              0      0   100%
	 base_python/cdk/utils/casing.py                4      0   100%
	 base_python/cdk/utils/event_timing.py         47      3    94%
	 base_python/client.py                         56     33    41%
	 base_python/entrypoint.py                     70     56    20%
	 base_python/integration.py                    52     25    52%
	 base_python/logger.py                         33     15    55%
	 base_python/schema_helpers.py                 56     41    27%
	 base_python/source.py                         51     34    33%
	 main_dev.py                                    3      3     0%
	 --------------------------------------------------------------
	 TOTAL                                        713    397    44%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                           Stmts   Miss  Cover
	 --------------------------------------------------
	 source_delighted/__init__.py       2      2     0%
	 --------------------------------------------------/actions-runner/_work/airbyte/airbyte/airbyte-integrations/connectors/source-delighted/.venv/lib/python3.8/site-packages/coverage/control.py:768: CoverageWarning: No data was collected. (no-data-collected)
	 source_delighted/source.py        97     97     0%
	   self._warn("No data was collected.", slug="no-data-collected")
	 --------------------------------------------------
	 TOTAL                             99     99     0%

@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 18, 2022 08:51 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 18, 2022 08:52 Inactive
@Zirochkaa Zirochkaa force-pushed the oleh/8906-output-only-new-records branch from 4ca1447 to 7bf1860 Compare January 28, 2022 15:18
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 28, 2022

/test connector=source-delighted

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              270    123    54%
	 source_acceptance_test/tests/test_full_refresh.py       52      2    96%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  54     17    69%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py      98     12    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                 1004    431    57%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                       Stmts   Miss  Cover
	 --------------------------------------------------------------
	 base_python/__init__.py                       13      0   100%
	 base_python/catalog_helpers.py                10      6    40%
	 base_python/cdk/__init__.py                    0      0   100%
	 base_python/cdk/abstract_source.py            89     64    28%
	 base_python/cdk/streams/__init__.py            0      0   100%
	 base_python/cdk/streams/auth/__init__.py       0      0   100%
	 base_python/cdk/streams/auth/core.py           8      1    88%
	 base_python/cdk/streams/auth/jwt.py            5      5     0%
	 base_python/cdk/streams/auth/oauth.py         37     26    30%
	 base_python/cdk/streams/auth/token.py          9      4    56%
	 base_python/cdk/streams/core.py               63     32    49%
	 base_python/cdk/streams/exceptions.py         10      2    80%
	 base_python/cdk/streams/http.py               67     33    51%
	 base_python/cdk/streams/rate_limiting.py      30     14    53%
	 base_python/cdk/utils/__init__.py              0      0   100%
	 base_python/cdk/utils/casing.py                4      0   100%
	 base_python/cdk/utils/event_timing.py         47      3    94%
	 base_python/client.py                         56     33    41%
	 base_python/entrypoint.py                     70     56    20%
	 base_python/integration.py                    52     25    52%
	 base_python/logger.py                         33     15    55%
	 base_python/schema_helpers.py                 56     41    27%
	 base_python/source.py                         51     34    33%
	 main_dev.py                                    3      3     0%
	 --------------------------------------------------------------
	 TOTAL                                        713    397    44%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                           Stmts   Miss  Cover
	 --------------------------------------------------
	 source_delighted/__init__.py       2      0   100%
	 source_delighted/source.py        97     18    81%
	 --------------------------------------------------
	 TOTAL                             99     18    82%

@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 28, 2022 15:20 Inactive
@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

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

❗ Current head f008a20 differs from pull request most recent head 4569705. Consider uploading reports for the commit 4569705 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##             master    #9550   +/-   ##
=========================================
  Coverage          ?   81.63%           
=========================================
  Files             ?        2           
  Lines             ?       98           
  Branches          ?        0           
=========================================
  Hits              ?       80           
  Misses            ?       18           
  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 c873898...4569705. Read the comment docs.

@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 31, 2022

/publish connector=connectors/source-delighted

🕑 connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771274598
❌ connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771274598

@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 31, 2022 07:08 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 31, 2022 07:09 Inactive
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 31, 2022

/publish connector=connectors/source-delighted

🕑 connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771313576
❌ connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771313576

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 31, 2022 07:21 Inactive
@Zirochkaa Zirochkaa force-pushed the oleh/8906-output-only-new-records branch from f008a20 to 425a59f Compare January 31, 2022 07:57
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 31, 2022

/test connector=source-delighted

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

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                 Stmts   Miss  Cover
	 ------------------------------------------------------------------------
	 source_acceptance_test/__init__.py                       2      0   100%
	 source_acceptance_test/base.py                          10      4    60%
	 source_acceptance_test/config.py                        74      6    92%
	 source_acceptance_test/conftest.py                     109    109     0%
	 source_acceptance_test/plugin.py                        47     47     0%
	 source_acceptance_test/tests/__init__.py                 4      0   100%
	 source_acceptance_test/tests/test_core.py              275    106    61%
	 source_acceptance_test/tests/test_full_refresh.py       52      2    96%
	 source_acceptance_test/tests/test_incremental.py        69     38    45%
	 source_acceptance_test/utils/__init__.py                 6      0   100%
	 source_acceptance_test/utils/asserts.py                 37      2    95%
	 source_acceptance_test/utils/common.py                  70     17    76%
	 source_acceptance_test/utils/compare.py                 62     23    63%
	 source_acceptance_test/utils/connector_runner.py       110     48    56%
	 source_acceptance_test/utils/json_schema_helper.py     105     13    88%
	 ------------------------------------------------------------------------
	 TOTAL                                                 1032    415    60%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                       Stmts   Miss  Cover
	 --------------------------------------------------------------
	 base_python/__init__.py                       13      0   100%
	 base_python/catalog_helpers.py                10      6    40%
	 base_python/cdk/__init__.py                    0      0   100%
	 base_python/cdk/abstract_source.py            89     64    28%
	 base_python/cdk/streams/__init__.py            0      0   100%
	 base_python/cdk/streams/auth/__init__.py       0      0   100%
	 base_python/cdk/streams/auth/core.py           8      1    88%
	 base_python/cdk/streams/auth/jwt.py            5      5     0%
	 base_python/cdk/streams/auth/oauth.py         37     26    30%
	 base_python/cdk/streams/auth/token.py          9      4    56%
	 base_python/cdk/streams/core.py               63     32    49%
	 base_python/cdk/streams/exceptions.py         10      2    80%
	 base_python/cdk/streams/http.py               67     33    51%
	 base_python/cdk/streams/rate_limiting.py      30     14    53%
	 base_python/cdk/utils/__init__.py              0      0   100%
	 base_python/cdk/utils/casing.py                4      0   100%
	 base_python/cdk/utils/event_timing.py         47      3    94%
	 base_python/client.py                         56     33    41%
	 base_python/entrypoint.py                     70     56    20%
	 base_python/integration.py                    52     25    52%
	 base_python/logger.py                         33     15    55%
	 base_python/schema_helpers.py                 56     41    27%
	 base_python/source.py                         51     34    33%
	 main_dev.py                                    3      3     0%
	 --------------------------------------------------------------
	 TOTAL                                        713    397    44%
	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                           Stmts   Miss  Cover
	 --------------------------------------------------
	 source_delighted/__init__.py       2      0   100%
	 source_delighted/source.py        97     18    81%
	 --------------------------------------------------
	 TOTAL                             99     18    82%

@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 31, 2022 07:59 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 31, 2022 07:59 Inactive
@Zirochkaa
Copy link
Contributor Author

Zirochkaa commented Jan 31, 2022

/publish connector=connectors/source-delighted

🕑 connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771476893
✅ connectors/source-delighted https://github.com/airbytehq/airbyte/actions/runs/1771476893

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets January 31, 2022 08:12 Inactive
@Zirochkaa Zirochkaa merged commit 0b1b75b into master Jan 31, 2022
@Zirochkaa Zirochkaa deleted the oleh/8906-output-only-new-records branch January 31, 2022 08:45
@Zirochkaa Zirochkaa temporarily deployed to more-secrets January 31, 2022 08:46 Inactive
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
Development

Successfully merging this pull request may close these issues.

🐛 Source Delighted: row limit still exists
4 participants