Skip to content

Honor verbose logging for Celery workers#69828

Merged
Miretpl merged 2 commits into
apache:mainfrom
jx2lee:jx2lee/celeryworker-loglevel
Jul 24, 2026
Merged

Honor verbose logging for Celery workers#69828
Miretpl merged 2 commits into
apache:mainfrom
jx2lee:jx2lee/celeryworker-loglevel

Conversation

@jx2lee

@jx2lee jx2lee commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes airflow celery worker -v so the Celery worker receives --loglevel DEBUG instead of only updating Airflow's root logger.

closes: #46990


Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

@jx2lee
jx2lee force-pushed the jx2lee/celeryworker-loglevel branch from e11a6af to 139c269 Compare July 13, 2026 15:05
@jx2lee
jx2lee marked this pull request as ready for review July 13, 2026 23:05
@jx2lee
jx2lee force-pushed the jx2lee/celeryworker-loglevel branch from 139c269 to 4c98101 Compare July 13, 2026 23:05
@Vamsi-klu

Copy link
Copy Markdown
Contributor

This one is straightforward. The if args.verbose: celery_log_level = "DEBUG" sits right after the CELERY_LOGGING_LEVEL/LOGGING_LEVEL resolution in worker() and before celery_log_level gets dropped into the --loglevel slot of options, so -v actually rides through to celery_app.worker_main now. args.verbose is the shared ARG_VERBOSE store_true wired into the worker command in definition.py, so it is always set and forcing DEBUG only ever raises verbosity, never lowers a configured level. The added test asserts the exact --loglevel DEBUG slot. Only stray thought is whether the generic -v help text ("Make logging output more verbose") makes this discoverable for the celery worker case, but that is non blocking.

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 15, 2026
@jx2lee
jx2lee force-pushed the jx2lee/celeryworker-loglevel branch from 4c98101 to d1e8ae4 Compare July 23, 2026 06:11

@Miretpl Miretpl 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.

I will wait with merge until current in-progress provider release will be finished.

@Miretpl
Miretpl merged commit 8d35eeb into apache:main Jul 24, 2026
79 checks passed
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 this pull request may close these issues.

airflow celery worker does not respect -v arg

4 participants