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

fix: Bust chart cache when metric/column is changed #15786

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jul 19, 2021

SUMMARY

Back in #8901 @villebro made changes to include datasource.changed_on to the chart cache key so that a change to the datasource would bust the chart cache. This was important because a user could change the sql for a datasource, but rerunning the chart wouldn't rerun the query before.

In this PR it seems like we intended to also bust the cache when metrics/columns were changed (https://github.com/apache/superset/pull/8901/files#r372541748) but that doesn't seem to work. This PR addresses that oversight and adds a test to check it

TESTING INSTRUCTIONS

CI, new unit test

create a chart, update a metric, see the chart's cache busted

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

to: @john-bodley @villebro @dpgaspar

@etr2460 etr2460 force-pushed the erik-ritter--update-datasource-changed-on branch from 0434e5b to 3ea58d5 Compare July 20, 2021 14:22
@etr2460 etr2460 force-pushed the erik-ritter--update-datasource-changed-on branch from 3ea58d5 to 031df18 Compare July 20, 2021 14:24
@etr2460
Copy link
Member Author

etr2460 commented Jul 20, 2021

/testenv up

@github-actions
Copy link
Contributor

@etr2460 Ephemeral environment spinning up at http://54.184.252.217:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@john-bodley john-bodley merged commit e969edc into apache:master Jul 21, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 13, 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 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants