Skip to content

Fix jobsink status Location paths for slashy event metadata#9100

Open
immanuwell wants to merge 1 commit into
knative:mainfrom
immanuwell:fix/jobsink-location-escaping
Open

Fix jobsink status Location paths for slashy event metadata#9100
immanuwell wants to merge 1 commit into
knative:mainfrom
immanuwell:fix/jobsink-location-escaping

Conversation

@immanuwell
Copy link
Copy Markdown

@immanuwell immanuwell commented Jun 1, 2026

Proposed Changes

  • escape source and id when jobsink builds the status Location header
  • unescape them on GET, so the status URL round-trips again
  • add unit tests for normal values and slash-heavy values

Repro

  1. Create a JobSink.
  2. Send an event with source=https://example.com/sources/my/source.
  3. Read the Location header from the POST response.
  4. GET that URL.

Before this patch, the GET can return 400 because raw / in source turn into extra path segments. Pretty normal input, the status URL just goes sideways a bit.

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

Fixed `jobsink` status `Location` URLs for events whose CloudEvents `source` or `id` contain `/`.

Docs

knative/docs#6651

Signed-off-by: immanuwell <pchpr.00@list.ru>
@knative-prow knative-prow Bot requested review from Leo6Leo and creydr June 1, 2026 05:51
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Jun 1, 2026

Welcome @immanuwell! It looks like this is your first PR to knative/eventing 🎉

@knative-prow knative-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 1, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Jun 1, 2026

Hi @immanuwell. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fix @immanuwell

/lgtm

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 1, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Jun 1, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, immanuwell

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2026
@creydr
Copy link
Copy Markdown
Member

creydr commented Jun 1, 2026

/ok-to-test

@knative-prow knative-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants