naruto-lgtm commented on PR #68617:
URL: https://github.com/apache/airflow/pull/68617#issuecomment-4742013252
Done. Routed variables, xcoms, the task store, HITL and connection-tests
through `_path` too.
One nuance worth flagging: variable and xcom keys are matched with a `:path`
converter server-side, so they can legitimately contain slashes. Quoting them
sends a real slash as `%2F`, which the ASGI layer decodes back to `/` before
routing, so multi-segment keys still resolve while a leading `..` can no longer
collapse onto another endpoint. The store key is a single segment on the
server, so that one's straightforward.
AssetStateStore already passes its key/name/uri as query params rather than
path segments, so it wasn't affected.
I left `task-instances/{id}` and `task-reschedules/{id}` as-is, since those
ids are server-issued UUIDs (strongly typed, and the task's own id rather than
a lookup), so there's no traversal surface. Happy to run them through the
helper too if you'd rather it be uniform everywhere.
Tests cover the segments whose behaviour actually changes (variable key, the
xcom dag_id/run_id/task_id, the store key); the UUID-only endpoints are a no-op
through the helper so I didn't add tests for those.
--
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]