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(permalink): remove memoize on get salt func #19749

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

villebro
Copy link
Member

SUMMARY

Currently the util function that fetches the permalink salt is memoized. This can cause trouble if the workers need to reference different metastores. While removal of the memoized decorator will have a performance impact, it should be negligible, as it's very light weight and occurs fairly infrequently. I will look into a better solution for avoiding refetching the salt on each permalink action.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Decoding a permalink with a salt different to that with which it was encrypted results in the following error:
image

TESTING INSTRUCTIONS

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #19749 (1016dc4) into master (57157c8) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #19749      +/-   ##
==========================================
- Coverage   66.51%   66.51%   -0.01%     
==========================================
  Files        1687     1687              
  Lines       64620    64618       -2     
  Branches     6646     6646              
==========================================
- Hits        42980    42978       -2     
  Misses      19940    19940              
  Partials     1700     1700              
Flag Coverage Δ
hive 52.69% <ø> (-0.01%) ⬇️
mysql 81.95% <ø> (-0.01%) ⬇️
postgres 82.00% <ø> (-0.01%) ⬇️
presto 52.54% <ø> (-0.01%) ⬇️
python 82.42% <ø> (-0.01%) ⬇️
sqlite 81.76% <ø> (-0.01%) ⬇️
unit 47.75% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset/key_value/shared_entries.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57157c8...1016dc4. Read the comment docs.

@villebro villebro merged commit cf51459 into apache:master Apr 18, 2022
@villebro villebro deleted the villebro/permalink-memo branch April 18, 2022 11:26
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 18, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.15

villebro added a commit that referenced this pull request Apr 25, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 lts-v1 preset:2022.15 preset-io size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants