Skip to content

Fix: Replace print with logger in Hive Hook kill method - #62990

Merged
potiuk merged 1 commit into
apache:mainfrom
Ironankit525:fix/hive-hook-logger
Mar 10, 2026
Merged

Fix: Replace print with logger in Hive Hook kill method#62990
potiuk merged 1 commit into
apache:mainfrom
Ironankit525:fix/hive-hook-logger

Conversation

@Ironankit525

Copy link
Copy Markdown
Contributor

Description

During static analysis, I noticed that print("Killing the Hive job") is being used rather than the standard Airflow structured logging in HiveCliHook.kill().

This PR replaces print with self.log.info so the message surfaces correctly in Airflow logs (e.g. Elasticsearch, CloudWatch, or local task logs) rather than bypassing it, making debugging job interruptions easier.

Tests

Tested manually with existing tests via CI.

  • The code is tested
  • - [ ] My PR has system tests (Not strictly required for this)
  • - [ ] The code is documented

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The change for hive is fine in isolation. But this PR has unrelated changes in the Open FaaS provider. Can you make a separate PR for that?

Comment thread providers/openfaas/src/airflow/providers/openfaas/hooks/openfaas.py Outdated
Signed-off-by: Ankit Kumar <ankitkumar17541@gmail.com>
@Ironankit525

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @SameerMesiah97! I have removed the OpenFaaS changes from this branch (force-pushed) so this PR now only contains the Hive logger fix.

The configurable OpenFaaS timeouts are now isolated and tracked in a separate PR here: #62731.

@potiuk
potiuk merged commit afce4dd into apache:main Mar 10, 2026
92 checks passed
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Signed-off-by: Ankit Kumar <ankitkumar17541@gmail.com>
Pyasma pushed a commit to Pyasma/airflow that referenced this pull request Mar 13, 2026
Signed-off-by: Ankit Kumar <ankitkumar17541@gmail.com>
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.

4 participants