influxdata / influxdata/kapacitor
Provisioning Kapacitor via HTTP - tabs in script data break json or script parser
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
__System info:__
Enterprise Kapacitor 1.3.3, Ubuntu 16.04
__Steps to reproduce:__
1. Take the batch example from http://docs.influxdata.com/kapacitor/v1.3/guides/continuous_queries/
2. Add any notation, for example ".align()" below the groupBy() notation. But indent the notation with tabs instead of spaces. Or just change the groupBy() notations space indentation to tabs
3. POST to Kapacitor HTTP end point (kapacitor/v1/tasks) to provision it
4. Kapacitor will tell you that you have invalid JSON
__Expected behavior:__
Should work with both tab and space indentation
__Actual behavior:__
The script and/or json parser used by kapacitor doesn't understand tabs and the request result in http 400, "invalid JSON"
__Additional info:__
Contributor guide
Research direction
Reproduce the request using the batch example from the Kapacitor continuous-queries documentation, changing indentation to tabs, and POST it to the kapacitor/v1/tasks endpoint. Trace the request's JSON and script parsing from that endpoint; done means tab-indented script data is accepted without the invalid JSON 400 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100