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(cache): coerce schema_cache_timeout to None #23157

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

cemremengu
Copy link
Contributor

@cemremengu cemremengu commented Feb 22, 2023

SUMMARY

Fixes #21827

When a database is created schema_cache_timeout property is set to empty string by default inside extra_json (or at least this is the case for older versions). This leads to the following error when calling get_all_schema_names which exptects an optional integer. This PR fixes this error.

redis.exceptions.ResponseError: value is not an integer or out of range

Additionally, these params don't seem to be used in get_all_schema_names. So maybe the best course is to remove them all together.

TESTING INSTRUCTIONS

Without this, the SQL Lab shows an error when fetching schemas

@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #23157 (077417e) into master (871cab8) will decrease coverage by 0.79%.
The diff coverage is n/a.

❗ Current head 077417e differs from pull request most recent head 750ee48. Consider uploading reports for the commit 750ee48 to get more accurate results

@@            Coverage Diff             @@
##           master   #23157      +/-   ##
==========================================
- Coverage   67.45%   66.67%   -0.79%     
==========================================
  Files        1898     1898              
  Lines       73111    73111              
  Branches     7952     7952              
==========================================
- Hits        49320    48744     -576     
- Misses      21755    22331     +576     
  Partials     2036     2036              
Flag Coverage Δ
hive ?
mysql ?
postgres ?
presto 52.74% <ø> (ø)
python 80.69% <ø> (-1.64%) ⬇️
sqlite 77.01% <ø> (ø)
unit 52.59% <ø> (ø)

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

Impacted Files Coverage Δ
superset/databases/api.py 85.60% <ø> (-5.92%) ⬇️
superset/datasets/commands/update.py 25.00% <0.00%> (-69.05%) ⬇️
superset/datasets/commands/bulk_delete.py 33.33% <0.00%> (-53.34%) ⬇️
superset/datasets/columns/commands/delete.py 44.11% <0.00%> (-52.95%) ⬇️
superset/datasets/metrics/commands/delete.py 44.11% <0.00%> (-52.95%) ⬇️
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/datasets/commands/delete.py 48.57% <0.00%> (-48.58%) ⬇️
superset/datasets/commands/refresh.py 43.75% <0.00%> (-43.75%) ⬇️
superset/datasets/dao.py 52.89% <0.00%> (-38.41%) ⬇️
superset/datasets/commands/duplicate.py 53.24% <0.00%> (-37.67%) ⬇️
... and 33 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

LGTM!

@Antonio-RiveroMartnez
Copy link
Member

When it comes to the removal of the cache_timeout, it is being accessed by the decorator:

@cache_util.memoized_func(

@rusackas rusackas merged commit c9ca172 into apache:master Apr 20, 2023
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.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 size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to load Tables in SQL Editor
4 participants