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

fix HttpAsyncHook PUTs with application/json #35404

Closed
2 tasks done
andrew9691 opened this issue Nov 3, 2023 · 1 comment · Fixed by #35405
Closed
2 tasks done

fix HttpAsyncHook PUTs with application/json #35404

andrew9691 opened this issue Nov 3, 2023 · 1 comment · Fixed by #35405
Labels

Comments

@andrew9691
Copy link
Contributor

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

HttpAsyncHook with method='PUT' and data is not supported. As far as I understood PUT is not in the list of available methods for passing kwarg json=data

What you think should happen instead

No response

How to reproduce

generate some PUT async hook runs with some data and await them:

http_async_hook = HttpAsyncHook(method='PUT', http_conn_id='some_conn_id')
hook_run_1 = http_async_hook.run(
    endpoint=f'/some/endpoint/{some_data_1["id"]}',
    data=some_data_1
)
hook_run_2 = http_async_hook.run(
    endpoint=f'/some/endpoint/{some_data_2["id"]}',
    data=some_data_2
)
tasks = [hook_run_1, hook_run_2]
responses = await asyncio.gather(*tasks)

Operating System

NAME="Linux Mint" VERSION="21.2 (Victoria)" ID_LIKE="ubuntu debian"VERSION_ID="21.2" UBUNTU_CODENAME=jammy

Versions of Apache Airflow Providers

apache-airflow==2.7.0
apache-airflow-providers-http==4.6.0

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@andrew9691 andrew9691 added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Nov 3, 2023
Copy link

boring-cyborg bot commented Nov 3, 2023

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@Taragolis Taragolis added area:providers provider:http and removed area:core needs-triage label for new issues that we didn't triage yet labels Nov 3, 2023
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 a pull request may close this issue.

2 participants