dandanseo123 opened a new pull request, #64392:
URL: https://github.com/apache/airflow/pull/64392
## Description
`get_default_celery_config()` uses `"amqp://" in broker_url` to detect AMQP
brokers, but this does not match `amqps://` URLs
This means RabbitMQ TLS connections (`amqps://`) never enter the AMQP SSL
branch, so `broker_use_ssl` is never populated with the correct parameter names
(`keyfile`, `certfile`, `ca_certs`). The result is an `AirflowException`
stating the broker doesn't support SSL.
Additionally, [PR #60675](https://github.com/apache/airflow/pull/60675)
(multi-team executor) changed `create_celery_app()` to rebuild config per
executor, bypassing user overrides set via `celery_config_options` in
airflow.cfg.
## Fix
1. Change URL detection from `"amqp://" in broker_url` to
`re.search(r"amqps?://", broker_url)` to match both `amqp://` and `amqps://`
3. After building default config in `create_celery_app()`, merge user's
`celery_config_options` overrides to restore backward compatibility.
## Testing
- Added 5 new tests covering both fixes
- `amqps://` broker URL correctly builds SSL config with
`keyfile`/`certfile`/`ca_certs`
- `amqp://` still works (no regression)
- `celery_config_options` override applied in `create_celery_app()`
- All existing non-DB tests pass locally
## Related
- [PR #60675](https://github.com/apache/airflow/pull/60675) (multi-team
executor refactoring)
- [Issue #39210](https://github.com/apache/airflow/issues/39210) (SSL bug,
closed as "Not Planned")
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (Claude Code)
Generated-by: Claude Code following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]