influxdata / ui

UI for InfluxDB
97 stars 42 forks source link

Issue on creating new task through UI #3430

Open debnathdubey opened 2 years ago

debnathdubey commented 2 years ago

About the bug

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Create a new task through UI something like this -
    
    import "slack"
    import "influxdata/influxdb/secrets"
    import "array"

option task = {name: "No Task", every: 1m, offset: 2s}

slack_endpoint = slack"endpoint" notification = { _notification_rule_id: "08762fc8a72f2000", _notification_rule_name: "My Test Rule", _notification_endpoint_id: "07fd2b39e56ee000", _notification_endpoint_name: "Slack Service", }

from(bucket: "TEST_DB") |> range(start: -1h) |> filter(fn: (r) => r["_measurement"] == "myMeasurement") |> filter(fn: (r) => r["_field"] == "testField") |> aggregateWindow(every: 1m, fn: count, createEmpty: false) |> filter(fn: (r) => r["_value"] > 3) |> monitor["notify"](data: notification, endpoint: slack_endpoint(mapFn: (r) => ({channel: "", text: "Count is getting higher...", color: "danger"})))


2. Save it.

**Expected behavior:**
Should have been saved

**Actual behavior:**
Raised an error and the whole popup getting closed and have to write whole code again.

**Visual Proof:**
![image](https://user-images.githubusercontent.com/36849367/146037283-dc1f6e62-b695-49ac-911a-8c0a467f17ac.png)

![image](https://user-images.githubusercontent.com/36849367/146035771-ee9356f7-9b5a-4fc3-91b3-5a2db81671ac.png)

## About your environment

**Environment info:**

InfluxDB2.0 (Docker Version)

**Config:**
NA

**Logs:**
NA

**Performance:**
NA
kristinarobinson commented 2 years ago

@dgnorton - this is the OSS version, can your team take a look?

philjb commented 2 years ago

I just discovered/ran into this in cloud2. I lost all my flux for the task I had been working on. It is an unpleasant experience - can we keep the task editor open until the task is validated fully? So if there is an error, the UI stays in the edit mode? The popup error bar doesn't stay around long enough to triage the issue and the flux it refers to is gone too.

I captured a gif task error

philjb commented 2 years ago

@kristinarobinson - this is an issue in cloud2 as well.

philjb commented 2 years ago

I think this is basically the same issue as https://github.com/influxdata/ui/issues/1444

aanthony1243 commented 2 years ago

@kristinarobinson @Luckette team-qx will take this issue. we can discuss more in person next week.