shahar1 opened a new pull request, #76192: URL: https://github.com/apache/airflow/pull/76192
Manual backport of #76147 to `airflow-ctl/v0-1-test` for 0.1.6. The automatic backport (run 41219287258) stopped on a conflict in `airflow-ctl/src/airflowctl/api/operations.py` and opened nothing: `main`'s file carries refactors this branch does not have (`validate_response` and friends), so the fix was re-applied by hand instead of cherry-picked. airflowctl built request paths from command arguments without encoding, so a key such as `a#b` was sent as `/api/v2/variables/a` (`#` ends the path), `?` started a query string and `/` or `..` moved the request to another endpoint. `airflowctl variables delete 'a#b'` against a 3.3.2 server deleted `a`, reported `a#b` and exited 0. Same fix as on `main`: a `_quote_path_param` helper (`quote(value, safe="")`, with `.` and `..` encoded because httpx strips dot-segments) applied to every value interpolated into a request path; query parameters and bodies are unchanged. On this branch that is 71 interpolations across 48 path f-strings in `operations.py`; no other module under `airflow-ctl/src` builds request paths. Helper copied verbatim from `main`; no other `main` change brought over. Original author kept. Tested on the branch: `uv run --project airflow-ctl pytest airflow-ctl/tests`: 612 passed; the five new test cases fail without the change. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5.1, with Sonnet 5.5 and Opus 5.5 subagents) Generated-by: Claude Code (Fable 5.1) 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]
