opensearch-project / opensearch-project/data-prepper
[BUG] Use Json Pointer syntax on copy_values processor "from_key"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 354
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Describe the bug
Trying to copy the value from a key with a "/" on the name
To Reproduce
Steps to reproduce the behavior:
Use the following processor with docker image 2.1.1:
processor:
- copy_values:
entries:
- from_key: "/kubernetes/labels/app/kubernetes/io~1name"
to_key: "app_name"
overwrite_if_to_key_exists: true
Expected behavior
I would expect the "~1" to be replaced with "/" as described on the expression documentations
Screenshots
java.lang.IllegalArgumentException: key /kubernetes/labels/app/kubernetes/io~1name must contain only alphanumeric chars with .-_ and must follow JsonPointer (ie. 'field/to/key')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the configuration with Docker image 2.1.1 and trace the copy_values processor's handling of from_key as a Json Pointer. Confirm the expected behavior for the escaped segment io~1name; done means the value is copied to app_name without the reported IllegalArgumentException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100