Launcher builds artifact URIs without percent-escaping, making some object names unaddressable
A pipeline root with the literal prefix root%20dir/ can produce a persisted artifact URI that the reader decodes to root dir/. Those are distinct object keys. The launcher builds the URI without escaping the prefix, and authorization uses the persisted spelling. A browser-side change cannot recover which key the producer meant. Producer · Reader.
Acceptance
- Reject a literal
%in the prefix of a suppliedpipeline_rootat run or recurring-run submission and when loading the namespace'skfp-launcherconfiguration. Identify the offending prefix before a task runs. Apply the check to root inputs without rejecting valid imported artifact URIs passed through the same lower-level parser. - Exercise
root%20dir/xandroot dir/xas distinct keys. Keep supported spaces, Unicode, ampersands and provider query strings working. Cover imported objects whose encoded URI represents a literal percent. - Document the new root restriction. Preserve the stored identity of existing artifacts. Changing how producers encode persisted URIs would require a separate migration or dual-read design.
PR #14829 proposes validation at root entry points. The artifact content API uses this case to verify that authorization and fetching agree on the object.
🤖 AI Issue Quality Review
⚠️ Validation Failed: Issue title must follow the correct format: <type>(<area>): <title contents>, where type is bug, chore, or feat.
Rename the issue with a valid title to retry the quality review automatically.
I’d like to take a look at this issue and work on a fix. I’ll first trace the existing pipeline_root validation paths and then add the necessary validation and regression tests.
Hey @jeffspahr, I noticed the earlier PR (#14107) was closed and predated the LoadLauncherConfig / mounted ConfigMap refactor in #14478 as well as the run-submission validation path.
I've reproduced the root%20dir/x vs root dir/x collision locally and have a fix ready with unit tests covering all three places from the issue description:
- Run / recurring-run submission (
toModelRuntimeConfig,NewV2SpecTemplate, andvalidatePipelineJobInputs) kfp-launcherConfigMap loading (LoadLauncherConfigFromPath/loadLauncherConfigFromMount,FetchLauncherConfigMap, andGetPipelineRootWithPipelineRunContext)ParseBucketPathToConfigas the runtime backstop (while preserving spaces, Unicode,&, and?query strings)
Could you please add the ready label (and maybe prefix the issue title with bug(backend): so the issue quality check passes) so I can open the PR under the new PR gate workflow?
Thanks!!
Opened #14829 for this. Thanks @jeffspahr for marking it ready!