superset icon indicating copy to clipboard operation
superset copied to clipboard

Annotations intermittently fail to display for many chart types

Open seo01 opened this issue 2 years ago • 3 comments

When adding Event or Interval annotations creates a chart that intermittently fails to render for many chart types.

How to reproduce the bug

Chart types I've confirmed this does happen with: Time-series Line Chart, Time-series Area Chart, Time-series Bar Chart v2, Mixed Time Series Chart types I've confirmed this does not happen with: Line Chart, Bar Chart

Annotations types I've confirmed this does happen with: Event (with Superset Annotation Source), Interval (with Superset Annotation Source) Annotations types I've confirmed this does not happen with: Formula

  1. Go to 'Create New Chart'
  2. Click on 'Time-series Line Chart'
  3. Choose a dataset
  4. Drag in a metric (e.g. the default count)
  5. Click Annotations and Layers
  6. Click Add annotation Layer
  7. Select 'Interval' for the annotation type
  8. Type anything for the name, e.g. "foobar"
  9. Select 'superset annotation' from the annotation source
  10. Select an annotation layer
  11. Click 'OK'
  12. Click 'Create Chart' <-- Sometimes this will trigger the issue
  13. Type a name for the chart in the top left box (e.g. "foo bar")
  14. Click "Save" and confirm the Save <-- This generally triggers the issue

Expected results

I expect a chart to be displayed with areas blocked out.

Actual results

An "Unexpected error" box is displayed.

image

Looking at the console it appears the data to load the graph is not fully loaded into the front end.

image

The bug is intermittent occurring ~90% of the time.

Environment

(please complete the following information):

  • browser type and version: Chrome 102.0.5005.115
  • superset version: 0.0.0dev (helm default)
  • python version: 3.8.12
  • node.js version: Node not installed
  • any feature flags active: DASHBOARD_RBAC

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [X] I have reproduced the issue with at least the latest released version of superset.
  • [X] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

seo01 avatar Jun 20 '22 19:06 seo01

I just experienced this too when attempting to come up with a POC for my company, sharing more of my observations for what its worth.

It starts to happen once I've saved a chart with annotations. In this case I'm using Time-series Bar Chart v2 as mentioned above.

Directus-2022-07-06-12-03-53

If I open the Annotation modal and hit Apply or OK the query goes through and the chart reloads with no issues

Directus-2022-07-06-12-04-03

Directus-2022-07-06-12-04-13

However once I hit "Save" for the chart in the top right the query stops working once more.

Directus-2022-07-06-12-04-21

This also affects the same chart inside a dashboard:

Directus-2022-07-06-12-04-25

Environment

browser type and version: Version 103.0.5060.53 superset version: 0.0.0dev (docker image from https://hub.docker.com/r/apache/superset) python version: 3.8.13 node.js version: Node not installed any feature flags active: DASHBOARD_CROSS_FILTERS

chaoticefx avatar Jul 06 '22 04:07 chaoticefx

We are updating to 2.0.0, this issue is blocking our rollout 😢.

image

BeckersJ avatar Jul 18 '22 12:07 BeckersJ

happening to us as well

inakianduaga avatar Aug 02 '22 08:08 inakianduaga

couldn't reproduce in latest master (last commit sha: 8f74e46d45ca94f5656f7b881f1096c16657c829)

used time series line chart, superset annotation for interval.

Screenshot from 2022-10-12 23-42-42

possible to test this on latest master?

mayurnewase avatar Oct 12 '22 18:10 mayurnewase

Looks fixed on my end! I'm not seeing this any more on the latest docker tag

chaoticefx avatar Oct 13 '22 01:10 chaoticefx

duplicate of #20845 ?

sfirke avatar Nov 03 '22 19:11 sfirke

image

It has been fixed please check and close this issue

Shazad-khan avatar Mar 16 '23 15:03 Shazad-khan