Bug description

Not able to enable tabs selection view while generating Alerts & Reports.

Here is the configuration: import logging import os import sys from celery.schedules import crontab from flask_caching.backends.filesystemcache import FileSystemCache logger = logging.getLogger() DATABASE_DIALECT = os.getenv("DATABASE_DIALECT") DATABASE_USER = os.getenv("DATABASE_USER") DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD") DATABASE_HOST = os.getenv("DATABASE_HOST") DATABASE_PORT = os.getenv("DATABASE_PORT") DATABASE_DB = os.getenv("DATABASE_DB") EXAMPLES_USER = os.getenv("EXAMPLES_USER") EXAMPLES_PASSWORD = os.getenv("EXAMPLES_PASSWORD") EXAMPLES_HOST = os.getenv("EXAMPLES_HOST") EXAMPLES_PORT = os.getenv("EXAMPLES_PORT") EXAMPLES_DB = os.getenv("EXAMPLES_DB") # The SQLAlchemy connection string. SQLALCHEMY_DATABASE_URI = ( f"{DATABASE_DIALECT}://" f"{DATABASE_USER}:{DATABASE_PASSWORD}@" f"{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_DB}" ) SQLALCHEMY_EXAMPLES_URI = ( f"{DATABASE_DIALECT}://" f"{EXAMPLES_USER}:{EXAMPLES_PASSWORD}@" f"{EXAMPLES_HOST}:{EXAMPLES_PORT}/{EXAMPLES_DB}" ) REDIS_HOST = os.getenv("REDIS_HOST", "redis") REDIS_PORT = os.getenv("REDIS_PORT", "6379") REDIS_CELERY_DB = os.getenv("REDIS_CELERY_DB", "0") REDIS_RESULTS_DB = os.getenv("REDIS_RESULTS_DB", "1") RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab") CACHE_CONFIG = { "CACHE_TYPE": "RedisCache", "CACHE_DEFAULT_TIMEOUT": 300, "CACHE_KEY_PREFIX": "superset_", "CACHE_REDIS_HOST": REDIS_HOST, "CACHE_REDIS_PORT": REDIS_PORT, "CACHE_REDIS_DB": REDIS_RESULTS_DB, } DATA_CACHE_CONFIG = CACHE_CONFIG class CeleryConfig: broker_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}" imports = ( "superset.sql_lab", "superset.tasks.scheduler", "superset.tasks.thumbnails", "superset.tasks.cache", ) result_backend = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}" worker_prefetch_multiplier = 1 task_acks_late = False beat_schedule = { "reports.scheduler": { "task": "reports.scheduler", "schedule": crontab(minute="", hour=""), }, "reports.prune_log": { "task": "reports.prune_log", "schedule": crontab(minute=10, hour=0), }, } CELERY_CONFIG = CeleryConfig FEATURE_FLAGS = {"ALERT_REPORTS": True, "ALERT_REPORT_TABS": True, "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True, "DASHBOARD_VIRTUALIZATION": False, "DASHBOARD_RBAC": True, "ALERTS_ATTACH_REPORTS": True, "ALLOW_FULL_CSV_EXPORT": True, "HORIZONTAL_FILTER_BAR": True, "ESTIMATE_QUERY_COST": True, "ENABLE_SUPERSET_META_DB": True, } ALERT_REPORTS_NOTIFICATION_DRY_RUN = True WEBDRIVER_BASEURL = "http://superset:8088/" # When using docker compose baseurl should be http://superset_app:8088/ # noqa: E501 # The base URL for the email report hyperlinks. WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL SQLLAB_CTAS_NO_LIMIT = True log_level_text = os.getenv("SUPERSET_LOG_LEVEL", "INFO") LOG_LEVEL = getattr(logging, log_level_text.upper(), logging.INFO) if os.getenv("CYPRESS_CONFIG") == "true": # When running the service as a cypress backend, we need to import the config # located @ tests/integration_tests/superset_test_config.py base_dir = os.path.dirname(file) module_folder = os.path.abspath( os.path.join(base_dir, "../../tests/integration_tests/") ) sys.path.insert(0, module_folder) from superset_test_config import * # noqa sys.path.pop(0) # # Optionally import superset_config_docker.py (which will have been included on # the PYTHONPATH) in order to allow for local settings to be overridden # try: import superset_config_docker from superset_config_docker import * # noqa logger.info( f"Loaded your Docker configuration at " f"[{superset_config_docker.file}]" ) except ImportError: logger.info("Using default Docker config...")

Image

Screenshots/recordings

No response

Superset version

4.1.2

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

To enable tab selection for dashboard alerts and reports in Superset version 4.1.2, you need to ensure that the feature flag ALERT_REPORT_TABS is enabled. According to your configuration, this flag is already set to True, which should activate the tab selection feature for alerts and reports [1].

If the feature is still not working as expected, consider checking the following:

  1. Browser Cache: Clear your browser cache or try accessing Superset in incognito mode to ensure that cached files are not causing the issue.
  2. Superset Logs: Review the Superset logs for any errors or warnings that might indicate why the feature is not functioning.
  3. Frontend Build: Ensure that the frontend assets are correctly built and up-to-date. Sometimes, rebuilding the frontend can resolve issues related to feature flags not being applied.

If these steps do not resolve the issue, it might be helpful to look for any related discussions or issues in the Superset community. I found a similar unsolved discussion titled "[alert/report] Solution for dashboards with multiple tabs" that might provide additional insights [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: sadpandajoe

@Keveen-ghori if you are referring to the feature in https://github.com/apache/superset/pull/29096, that isn't in the 4.1.X releases, however, you can try it out in 5.0.0rc1 as seen in the change log here: https://github.com/apache/superset/blob/5.0.0rc1/CHANGELOG/5.0.0.md

Comment From: rusackas

5.0.0 is out now, so I'm assuming that closes this issue. Correct me if I'm mistaken!