influxdata / influxdata/kapacitor
YAML to JSON conversion is breaking group by time for task definition files
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
When defining a task from a YAML, it appears to be internally converted to JSON. It is currently impossible to group by time for batch queries because the converter decides that it needs to add literal quotes around the time string. When passing a list like:
```
groups:
type: list
value:
- type: string
value: time(1m)
- type: string
value: host
- type: string
value: datacenter
- type: string
value: location
```
The query sent to influx ends up as `GROUP BY \"time(1m)\", host, datacenter, location`, which causes the query to fail.
This is using version 1.4.0
Contributor guide
Research direction
Start by reproducing the YAML task-definition example from the issue and trace its YAML-to-JSON conversion through the query generation path. Check how the GROUP BY list formats time(1m), then verify that the generated Influx query preserves time(1m) without literal quotes while retaining quotes for ordinary string values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100