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

   ## Why
   
   `airflow api-server --apps` picks which sub-apps get mounted. `create_app()` 
split the value on commas and compared the raw pieces, with no validation:
   
   - `--apps "core, execution"` — `" execution"` never matched, so `/execution` 
was not mounted and every worker callback 404'd. The server started normally 
and printed `Apps: core, execution`.
   - `--apps cores` — matched neither branch, so the server came up with no 
routes at all.
   
   Both failed silently. `AIRFLOW_API_APPS` reaches the same code.
   
   ## What
   
   `parse_apps_selection()` strips whitespace, drops empty entries and rejects 
unknown names; an empty selection still means `all`. The CLI validates up 
front, since the app is only built after the process forks. Values that were 
already valid are unaffected.
   
   Two calls for you to make:
   
   - The check sits in the command body, so `@action_cli` writes its audit row 
before a bad value is rejected. An argparse `type=` would need either a 
duplicate copy of the valid-name list or a `airflow.api_fastapi.app` import at 
CLI parse time.
   - `--apps ALL` is now rejected rather than silently mounting nothing. Say 
the word and I'll add `.lower()`.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) 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]

Reply via email to