influxdata / influxdata/influxdb

different error-message structure in influxdb 1.8.x and 2.0.x when using InfluxQL

Open
#21,173 1 comment 2 reactions 0 assignees View on GitHub
area/2.x area/compat-v1x area/influxql
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__

1. using influxdb 1.8.4, execute an invalid query using a POST request at `/query`, for example the query "SOMETHING"
2. the returned JSON will be like this:
```
{
"error": "error parsing query: found SOMETHING, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET,
KILL at line 1, char 1"
}
```
3. do the same with influxdb 2.0.4 (where the influxql-compatibility-things have been set up)
4. the returned JSON will be like this:
```
{
"code": "invalid",
"message": "failed to parse query: found SOMETHING, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER,
SET, KILL at line 1, char 1"
}
```
5. the error-message structure is different between influxdb1 and influxdb2

__Expected behavior:__
Influx1 and Influx2 use the same error-message structure when queried in influxql-mode

__Actual behavior:__
Influx1 and Influx2 have different error-message structures when queried in influxql-mode

__Environment info:__

* System info: docker
* InfluxDB version: 1.8.4 and 2.0.4 in docker

__Config:__
default config used.

Contributor guide

Open the contributing guide

Research direction

Reproduce the invalid InfluxQL request against the `/query` endpoint using the Docker-based InfluxDB 1.8.4 and 2.0.4 setups described in the issue, then trace the compatibility response handling. Done means both versions return the same error-message structure for equivalent InfluxQL parse failures, with regression coverage if the relevant test area is found.

Written by the indexing model from the issue text.

Assessment

Domain
api, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.