-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Fix HttpOperator pagination with str
data
#35782
Merged
potiuk
merged 8 commits into
apache:main
from
Joffreybvn:fix/http-operator-paginate-with-string-data
Nov 22, 2023
Merged
Fix HttpOperator pagination with str
data
#35782
potiuk
merged 8 commits into
apache:main
from
Joffreybvn:fix/http-operator-paginate-with-string-data
Nov 22, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joffreybvn
force-pushed
the
fix/http-operator-paginate-with-string-data
branch
from
November 21, 2023 20:54
581363d
to
d904a72
Compare
Nice. |
potiuk
approved these changes
Nov 21, 2023
NIT: should we also get a unit test with dicts passed as data and being merged? Maybe a |
harishkesavarao
approved these changes
Nov 22, 2023
hussein-awala
approved these changes
Nov 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for this.
Yes, will add a stronger test 👍 |
potiuk
approved these changes
Nov 22, 2023
ephraimbuddy
pushed a commit
that referenced
this pull request
Nov 23, 2023
* feat: Restrict `data` parameter typing Follows the hook's typing * feat: Implement `data` override when string * feat: Improve docstring about merging and overriding behavior * fix: Add correct typing for mypy * feat: add test * fix: remove unused imports * fix: Update SimpleHttpOperator docstring * feat: Correctly test parameters overriding
ephraimbuddy
pushed a commit
that referenced
this pull request
Nov 26, 2023
* feat: Restrict `data` parameter typing Follows the hook's typing * feat: Implement `data` override when string * feat: Improve docstring about merging and overriding behavior * fix: Add correct typing for mypy * feat: add test * fix: remove unused imports * fix: Update SimpleHttpOperator docstring * feat: Correctly test parameters overriding
50 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
When the HttpOperator is declared with a string in the
data
parameter, the pagination fails. Same when a string is returned fordata
by the pagination function. This is because the_merge_next_page_parameters
was not handling the case where data is a string.Thus, this PR:
→ Now, during the merge, if any of the data parameter is a string, the new one simply override the initial one
dict | str | None
instead ofAny
→ To be consistent with the HttpHook and the HttpTrigger
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.