redpanda-data / redpanda-data/benthos
Unable to retrieve the updated configuration from the debug endpoint with the watcher flag enabled.
Open
Nobody has claimed this yet.
bug
needs investigation
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
Description :
- While running a custom build of red-panda-connect with the watcher flag enabled in debug mode and trying to retrieve the latest configuration from the debug endpoint.
- The documentation (REF) states that the following endpoints should provide the current configuration:
/debug/config/jsonreturns the configuration in JSON format/debug/config/yamlreturns the configuration in YAML format
However, after updating the configuration file, these endpoints still return the older configuration Instead It Should Return the latest configuration which red-panda-connect is using.
How To Reporduce
- create one
config.jsonfile. (you can use yaml as well)
"http":{
"enabled": true,
"address": "0.0.0.0:4195",
"root_path": "/benthos",
"debug_endpoints": true
},
"input": {
"generate": {
"count": 100,
"mapping": "root = \"hello\""
}
},
"output": {
"stdout": {
"codec": "lines"
}
},
"pipeline": {
"processors": [
{
"mapping": "root.data = \"xyzza\"\n root.abc = \"abcd\""
}
]
}
}
- Run rpk file with this command
rpk connect run -c temp.json --w - Execute Below curl command
curl --location 'http://0.0.0.0:4195/benthos/debug/config/json
- Now done some change in above mentioned file
- Re run the above curl command
Expectation
- When the user executes the curl command a second time, it should return the latest configuration. However, it is currently returning the older configuration.
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 issue with rpk connect run -c temp.json --w and the /debug/config/json or /debug/config/yaml endpoints. Trace how the watcher reloads the configuration and how the debug endpoint reads it. Done means both endpoints return the latest configuration after the file changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100