superset
superset copied to clipboard
[BUG] Annotation Layers of type Formula aren't rendered for new charts
Since upgrading from Superset 2.0.1 to 3.0.2, creating new charts or editing existing charts with annotations layers results in them not being rendered. Already existing charts still render annotations layers in dashboard.
How to reproduce the bug
- Create a new chart, e.g. Line Chart
- Define any metric so something is rendered
- Create an Annotation Layer of type Formula
Expected results
Annotation actually gets rendered
Actual results
Annotation doesn't get rendered
Screenshots
Environment
(please complete the following information):
- browser type and version: Firefox 120.0.1 (64-bit)
- superset version:
3.0.2-py310
(official docker image deployed on K8s
Feature flags:
'DASHBOARD_CROSS_FILTERS': True,
'DASHBOARD_RBAC': True,
'DASHBOARD_VIRTUALIZATION': True,
'DRILL_BY': True,
'DRUID_JOINS': True,
'ENABLE_TEMPLATE_PROCESSING': True,
'HORIZONTAL_FILTER_BAR': True,
I'm facing the same issue here on Superset 3.0.0:
I'm also experiencing this issue, Superset 3.1.1. For what it's worth, I have the following overlap in feature flags with @D3nn3: "DASHBOARD_RBAC": True, "ENABLE_TEMPLATE_PROCESSING": True, "HORIZONTAL_FILTER_BAR": True
@D3nn3, @matheusbsilva I did some digging, and I did discover a workaround - hoping to solve the root cause at some point when I get some more time.
I got my local environment hooked up to my production database for debugging, and found that when I tried an annotation layer on a different dataset, it worked. I still however couldn't get the annotation to show up on the original dataset I was testing with. I then had the idea to duplicate the original dataset and try on the duplicate, and sure enough the annotation showed up.
So as a workaround, I can create a duplicate dataset and switch my existing charts to the new dataset, and that seems to do the trick for now.
Hope this works for other people experiencing the issue, would love to hear if it does!
EDIT: I should clarify that when I say "duplicate", I mean create a new dataset with the same SQL - using the duplicate feature led to the same issue as before.
I had some time to try out your findings @garrett-franklin30 and I could replicate them.
- Took a dataset where annotation layers are bugged
- Duplicated the dataset with the provides Superset feature -> no success
- Created a new dataset with the same query -> success
While trying to figure out what the problem was, a colleague and I also find out that it seems to sometimes work and sometimes not. Could be that the reason were different datasets, so this bug might be dataset dependent.