Skip to content

Parse additional Kafka, Redis & SQS options in broker_transport_options - #70228

Merged
Miretpl merged 7 commits into
apache:mainfrom
stephen-bracken:fix-celery-json
Aug 19, 2026
Merged

Miretpl merged 7 commits into
apache:mainfrom
stephen-bracken:fix-celery-json

Conversation

@stephen-bracken

@stephen-bracken stephen-bracken commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Parse additional dict options in broker_transport_options

The following options in broker_transport_options are processed as nested dictionaries in the celery config, they should be json parsed in the same way as sentinel_kwargs when creating the default_celery.DEFAULT_CELERY_CONFIG

Kafka:

  • kafka_admin_config
  • kafka_common_config
  • kafka_consumer_config
  • kafka_producer_config

Redis:

  • sentinel_kwargs

SQS:

  • client-config
  • fetch_message_attributes
  • predefined_exchanges
  • predefined_queues
  • sqs-creation-attributes
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
  • No

@stephen-bracken
stephen-bracken force-pushed the fix-celery-json branch 10 times, most recently from a6b6db4 to 0e89415 Compare July 23, 2026 09:06
@stephen-bracken
stephen-bracken marked this pull request as ready for review July 23, 2026 10:38

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

Could you update the provider documentation configuration?

Comment thread providers/celery/tests/unit/celery/executors/test_celery_executor.py Outdated
@stephen-bracken
stephen-bracken force-pushed the fix-celery-json branch 2 times, most recently from 72bf60c to 8538b1f Compare August 1, 2026 18:33
@stephen-bracken
stephen-bracken requested a review from Miretpl August 5, 2026 09:21
Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
Comment thread providers/celery/src/airflow/providers/celery/get_provider_info.py
Comment thread providers/celery/src/airflow/providers/celery/get_provider_info.py Outdated
@stephen-bracken
stephen-bracken force-pushed the fix-celery-json branch 7 times, most recently from f8c5ace to 1233155 Compare August 13, 2026 16:32
Stephen Bracken and others added 3 commits August 13, 2026 17:32
* remove formatting from `fetch_message_attributes` example
* change `AirflowException` to `ValueError`

Co-authored-by: Przemysław Mirowski <17602603+Miretpl@users.noreply.github.com>

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

Small nits and we will be ready to merge. Thanks for taking care of AirflowException here!

Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
Comment thread providers/celery/src/airflow/providers/celery/executors/default_celery.py Outdated
stephen-bracken and others added 2 commits August 17, 2026 09:59
Co-authored-by: Przemysław Mirowski <17602603+Miretpl@users.noreply.github.com>

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

Will leave it a day or two open if anyone would like to make review too.

@Miretpl Miretpl changed the title parse additional dict options in broker_transport_options Parse additional Kafka, Redis & SQS options in broker_transport_options Aug 17, 2026
@Miretpl
Miretpl merged commit 68e1eb4 into apache:main Aug 19, 2026
80 checks passed
@stephen-bracken
stephen-bracken deleted the fix-celery-json branch August 22, 2026 10:42
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…ons` (apache#70228)

* parse additional dict options in broker_transport_options

* Apply suggestions from code review

* remove formatting from `fetch_message_attributes` example
* change `AirflowException` to `ValueError`

Co-authored-by: Przemysław Mirowski <17602603+Miretpl@users.noreply.github.com>

* update type hinting

* add predefined_queues test and config doc

* fix mypy and linting

* Update exception messages

Co-authored-by: Przemysław Mirowski <17602603+Miretpl@users.noreply.github.com>

* fix linting

---------

Co-authored-by: Stephen Bracken <email-protected>
Co-authored-by: Przemysław Mirowski <17602603+Miretpl@users.noreply.github.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.

2 participants