pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

Launcher builds artifact URIs without percent-escaping, making some object names unaddressable

Open jeffspahr opened this issue 3 months ago • 4 comments

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 supplied pipeline_root at run or recurring-run submission and when loading the namespace's kfp-launcher configuration. 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/x and root dir/x as 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.

jeffspahr avatar Aug 20 '26 22:08 jeffspahr

🤖 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.

github-actions[bot] avatar Aug 20 '26 22:08 github-actions[bot]

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.

Sumitha007 avatar Aug 21 '26 04:08 Sumitha007

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:

  1. Run / recurring-run submission (toModelRuntimeConfig, NewV2SpecTemplate, and validatePipelineJobInputs)
  2. kfp-launcher ConfigMap loading (LoadLauncherConfigFromPath / loadLauncherConfigFromMount, FetchLauncherConfigMap, and GetPipelineRootWithPipelineRunContext)
  3. ParseBucketPathToConfig as 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!!

abhayjoshi201 avatar Oct 03 '26 18:10 abhayjoshi201

Opened #14829 for this. Thanks @jeffspahr for marking it ready!

abhayjoshi201 avatar Oct 12 '26 20:10 abhayjoshi201