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

[ISSUE #20771] limiting the number of requests performed to the backe… #21525

Merged
merged 12 commits into from
Jan 24, 2023

Conversation

maxi297
Copy link
Contributor

@maxi297 maxi297 commented Jan 18, 2023

…nd without flag

What

This addresses the first part of #20771 where we want to limit the number of requests done to the back. As for this PR, the flag is excluded and another PR will follow.

How

Change the behaviour at runtime of the paginator and the simple retriever.

Recommended reading order

  1. airbyte-cdk/python/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py
  2. airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py
  3. The rest

🚨 User Impact 🚨

Users of the connector builder should see a great improvement in the response time when reading a stream. However, the response can now be partial if there is more than 5 slices of 5 pages

@maxi297 maxi297 requested a review from a team as a code owner January 18, 2023 15:16
@octavia-squidington-iv octavia-squidington-iv added the CDK Connector Development Kit label Jan 18, 2023
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:18 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:19 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:22 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:22 — with GitHub Actions Inactive
@maxi297 maxi297 force-pushed the issue-20771_limit-number-of-requests-to-endpoint branch from 57bd846 to 00a3558 Compare January 18, 2023 15:30
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:31 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 18, 2023 15:32 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 19, 2023 16:42 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 19, 2023 16:43 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 19, 2023 17:33 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 19, 2023 17:36 — with GitHub Actions Inactive
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.

minor request to use two separate flags instead of a generic is_test_read flag, but looks good otherwise

Copy link
Contributor

@brianjlai brianjlai left a comment

Choose a reason for hiding this comment

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

a small nit comment, but otherwise looks good to me!

maxi297 and others added 2 commits January 20, 2023 13:52
* [ISSUE #20771] adding slices to connector builder read request

* [ISSUE #20771] formatting

* [ISSUE #20771] set flag when limit requests reached (#21619)

* [ISSUE #20771] set flag when limit requests reached

* [ISSUE #20771] assert proper value on test read objects __init__

* [ISSUE #20771] code review and fix edge case
@maxi297 maxi297 temporarily deployed to more-secrets January 20, 2023 19:24 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 20, 2023 19:25 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 20, 2023 19:56 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 20, 2023 19:56 — with GitHub Actions Inactive
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.

looks good. only a couple of small questions 🚢

@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 13:39 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 13:40 — with GitHub Actions Inactive
@airbyteio airbyteio temporarily deployed to more-secrets January 24, 2023 14:20 — with GitHub Actions Inactive
@airbyteio airbyteio temporarily deployed to more-secrets January 24, 2023 14:20 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 14:30 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 14:30 — with GitHub Actions Inactive
@maxi297 maxi297 enabled auto-merge (squash) January 24, 2023 14:34
@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 14:42 — with GitHub Actions Inactive
@maxi297 maxi297 temporarily deployed to more-secrets January 24, 2023 14:42 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Airbyte Code Coverage

There is no coverage information present for the Files changed

Total Project Coverage 26.7% 🍏

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

Successfully merging this pull request may close these issues.

5 participants