Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Removes the deprecated DASHBOARD_CACHE feature flag #26349

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Dec 22, 2023

SUMMARY

As part of the 4.0 approved initiatives, this PR removes the DASHBOARD_CACHE feature flag.

The previous value of the feature flag was False and now the feature is permanently removed.

TESTING INSTRUCTIONS

CI should be sufficient for merging this PR. We'll do a complete testing of 4.0 after all approved proposals are merged.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@michael-s-molina michael-s-molina added risk:breaking-change Issues or PRs that will introduce breaking changes hold! On hold v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch labels Dec 22, 2023
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9387c4c) 66.85% compared to head (11c10e4) 66.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #26349      +/-   ##
==========================================
+ Coverage   66.85%   66.88%   +0.02%     
==========================================
  Files        1931     1938       +7     
  Lines       75355    75505     +150     
  Branches     8431     8467      +36     
==========================================
+ Hits        50378    50499     +121     
- Misses      22829    22847      +18     
- Partials     2148     2159      +11     
Flag Coverage Δ
mysql 77.88% <100.00%> (+0.02%) ⬆️
postgres 78.01% <100.00%> (+0.02%) ⬆️
python 78.15% <100.00%> (+0.02%) ⬆️
sqlite 77.59% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-s-molina michael-s-molina changed the title refactor: Removes the DASHBOARD_CACHE feature flag refactor: Removes the deprecated DASHBOARD_CACHE feature flag Dec 26, 2023
UPDATING.md Outdated
@@ -29,6 +29,8 @@ assists people when migrating to a new version.

### Breaking Changes

- [26349](https://github.com/apache/superset/issues/26349): Removes the deprecated `DASHBOARD_CACHE` feature flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the consequences of removing the cache? Is there merit in expanding why this was removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this feature never worked correctly. It was Airbnb who introduced it and quickly disabled it because of problems reported by users while using the dashboards.

@michael-s-molina michael-s-molina requested a review from a team December 28, 2023 19:26
@michael-s-molina michael-s-molina marked this pull request as ready for review January 5, 2024 18:53
@michael-s-molina michael-s-molina removed the hold! On hold label Jan 16, 2024
@michael-s-molina michael-s-molina merged commit 2d3ff8c into apache:master Jan 16, 2024
33 checks passed
@mistercrunch
Copy link
Member

Getting an error trying to delete a dashboard in the UI and thought it may be related:

Traceback (most recent call last):
  File "/Users/max/.pyenv/versions/3.9.16/envs/superset/lib/python3.9/site-packages/flask_appbuilder/api/__init__.py", line 110, in wraps
    return f(self, *args, **kwargs)
  File "/Users/max/code/superset/superset/views/base_api.py", line 127, in wraps
    raise ex
  File "/Users/max/code/superset/superset/views/base_api.py", line 121, in wraps
    duration, response = time_function(f, self, *args, **kwargs)
  File "/Users/max/code/superset/superset/utils/core.py", line 1454, in time_function
    response = func(*args, **kwargs)
  File "/Users/max/code/superset/superset/utils/log.py", line 255, in wrapper
    value = f(*args, **kwargs)
  File "/Users/max/code/superset/superset/charts/api.py", line 459, in delete
    DeleteChartCommand([pk]).run()
  File "/Users/max/code/superset/superset/commands/chart/delete.py", line 50, in run
    Dashboard.clear_cache_for_slice(slice_id=model_id)
  File "/Users/max/code/superset/superset/utils/decorators.py", line 180, in wrapped
    result = f(*args, **kwargs)
  File "/Users/max/code/superset/superset/models/dashboard.py", line 336, in clear_cache_for_slice
    cls(id=dashboard_id).clear_cache()
  File "/Users/max/code/superset/superset/utils/decorators.py", line 180, in wrapped
    result = f(*args, **kwargs)
  File "/Users/max/code/superset/superset/models/dashboard.py", line 327, in clear_cache
    cache_manager.cache.delete_memoized(Dashboard.datasets_trimmed_for_slices, self)
  File "/Users/max/.pyenv/versions/3.9.16/envs/superset/lib/python3.9/site-packages/flask_caching/__init__.py", line 1020, in delete_memoized
    cache_key = f.make_cache_key(f.uncached, *args, **kwargs)
AttributeError: 'function' object has no attribute 'make_cache_key'

@mistercrunch
Copy link
Member

checking out the SHA right before this got merged in master fixes the issue @michael-s-molina @eschutho

@michael-s-molina
Copy link
Member Author

Getting an error trying to delete a dashboard in the UI and thought it may be related:

Thanks for reporting the issue @mistercrunch. I opened #26648 to fix it.

sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.0.0 labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels risk:breaking-change Issues or PRs that will introduce breaking changes size/M v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🚢 4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants