influxdata / influxdata/influxdb

Completions for flux record not working

Open
#19,305 1 comment 0 reactions 0 assignees View on GitHub
team/query
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. enter query editor within data filter on data that has records
```
from(bucket: "bucket1")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "procstat")
|> filter(fn: (r) => r.) // <---- COMPLETIONS NOT Shown accurately
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
```

![image](https://user-images.githubusercontent.com/17263167/90052701-63706b00-dc8e-11ea-961b-18d15d6dea75.png)

for the above you don't get any completions. When that filter is changed to `filter(fn: (r) => r` you will receive the following and the `r` object is not listed:

![image](https://user-images.githubusercontent.com/17263167/90051446-8dc12900-dc8c-11ea-94e9-11b7780f42ea.png)

__Expected behavior:__
Expected to get `r` in the completions before the `.` and get its properties once I enter the dot.

__Actual behavior:__
no completions are provided

__Environment info:__

* System info: `Darwin 18.7.0 x86_64`
* Influxd version: master(b12c3ef77b)
* Browser: FireFox 79.0

Contributor guide

Open the contributing guide

Research direction

Start in the query editor within the data filter and reproduce the issue using the Flux query from the report. Check completion behavior at `r` and `r.`; done means `r` appears before the dot and its properties appear after entering the dot.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.