LemonCondor opened a new pull request, #74631:
URL: https://github.com/apache/airflow/pull/74631

   When the API server runs with the gunicorn server type, 
`create_gunicorn_app` builds the bind address as `f"{host}:{port}"`. Gunicorn 
splits unbracketed addresses on `:`. So `airflow api-server --host ::` (or 
`::1`) produces `:::8080`, and gunicorn refuses to start with `'' is not a 
valid port number`. The uvicorn path accepts the same host.
   
   This change brackets IPv6 literals (`[::]:8080`). Hostnames, IPv4 addresses 
and hosts that are already bracketed are left unchanged.
   
   I added a parametrized regression test to `TestCreateGunicornApp`. Without 
the fix, the `::` and `::1` cases fail. With the fix, `pytest 
airflow-core/tests/unit/cli/commands/test_gunicorn_monitor.py -k 
TestCreateGunicornApp` passes (15 tests).
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   


-- 
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]

Reply via email to