Skip to content

FIX: Allow override of HTTP method in run_method of LivyAsyncHook - #64150

Merged
eladkal merged 5 commits into
apache:mainfrom
dabla:fix/override-method-async-livy
Mar 24, 2026
Merged

FIX: Allow override of HTTP method in run_method of LivyAsyncHook#64150
eladkal merged 5 commits into
apache:mainfrom
dabla:fix/override-method-async-livy

Conversation

@dabla

@dabla dabla commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

LivyAsyncHook ignores run_method HTTP method after refactor LivyAsyncHook.run_method now accepts a nullable method parameter and validates it, but never applies it to the underlying HttpAsyncHook. The new implementation always uses AsyncHttpSession.run, which selects the HTTP verb from the hook’s self.method property. Since LivyAsyncHook initializes self.method to POST and run_method no longer overrides it, calls that previously defaulted to GET (or explicitly requested GET/PUT/DELETE) are sent as POST. This is a functional regression that can cause incorrect requests or unintended state changes against the Livy API (e.g., get_batch_state now issues POST).


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@eladkal
eladkal merged commit 6f998c7 into apache:main Mar 24, 2026
94 checks passed
vatsrahul1001 pushed a commit that referenced this pull request Mar 25, 2026
…4150)

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Removed duplicate test_run_method_success as it is the same as test_run_get_method_with_success
aaron-y-chen pushed a commit to aaron-y-chen/airflow that referenced this pull request Mar 30, 2026
…ache#64150)

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Removed duplicate test_run_method_success as it is the same as test_run_get_method_with_success
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 2026
…ache#64150)

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Removed duplicate test_run_method_success as it is the same as test_run_get_method_with_success
abhijeets25012-tech pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Apr 9, 2026
…ache#64150)

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Allow override the method in run_method of LivyAsyncHook

* refactor: Removed duplicate test_run_method_success as it is the same as test_run_get_method_with_success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants