Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting transforms endpoint does not unescape name param #16643

Closed
weeco opened this issue Feb 19, 2024 · 0 comments · Fixed by #16858
Closed

Deleting transforms endpoint does not unescape name param #16643

weeco opened this issue Feb 19, 2024 · 0 comments · Fixed by #16858
Assignees
Labels
area/admin-api area/wasm WASM Data Transforms kind/bug Something isn't working

Comments

@weeco
Copy link

weeco commented Feb 19, 2024

Version & Environment

Redpanda version: (use rpk version): v23.3.5

What went wrong?

I created a transform with name some-transform/name that&requires! encoding and was unable to delete it using:

curl -i -X "DELETE" http://localhost:65193/v1/transforms/some-transform%2Fname%20that%26requires%21%20encoding
HTTP/1.1 404 Not Found
Content-Length: 37
Server: Seastar httpd
Date: Mon, 19 Feb 2024 16:04:42 GMT
Content-Type: application/json

{"message": "Not found", "code": 404}%

What should have happened instead?

It should have unescaped the parameter so that it matches the transform that I created previously.

How to reproduce the issue?

  1. Create a transform with a name that contains special characters that require encoding/decoding
  2. Try to delete that transform

Additional information

This seems to be a common bug in the admin API. See:

curl -s http://localhost:65193/v1/transform | jq .
[
  {
    "name": "test-get-tf",
    "input_topic": "wasm-tfm-create-test-c",
    "output_topics": [
      "wasm-tfm-create-test-d"
    ],
    "status": [
      {
        "node_id": 0,
        "partition": 0,
        "lag": 0,
        "status": "running"
      },
      {
        "node_id": 0,
        "partition": 1,
        "lag": 0,
        "status": "running"
      }
    ],
    "environment": [
      {
        "key": "foo",
        "value": "bar"
      }
    ]
  },
  {
    "name": "some-transform/name that&requires! encoding",
    "input_topic": "wasm-tfm-create-test-c",
    "output_topics": [
      "wasm-tfm-create-test-d"
    ],
    "status": [
      {
        "node_id": 0,
        "partition": 0,
        "lag": 0,
        "status": "running"
      },
      {
        "node_id": 0,
        "partition": 1,
        "lag": 0,
        "status": "running"
      }
    ],
    "environment": [
      {
        "key": "foo",
        "value": "bar"
      }
    ]
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/admin-api area/wasm WASM Data Transforms kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants