fix: ensure numeric values for extra metadata_cache_timeout payloads #28737
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
We identified an issue where FileSystemCache is used, setting values for
table_cache_timeout
andschema_cache_timeout
in the database properties modal leads to failures in fetching schema and table lists in SQLLab. The requests to/api/v1/database/{dbId}/tables/?q=(force:!f,schema_name:{schemaName})
were returning a 422 UNPROCESSABLE ENTITY status.The root cause of the issue was that
table_cache_timeout
andschema_cache_timeout
values were being serialized as strings instead of numbers. The backend expected numeric values, resulting in the 422 error when it encountered strings. To resolve this, we need to ensure that these values are correctly converted to numbers before they are sent in the payload.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before
bug-superset-db-timeout.mp4
After
Screencast.from.05-28-2024.05.46.23.AM.mp4
TESTING INSTRUCTIONS
SCHEMA CACHE TIMEOUT
andTABLE CACHE TIMEOUT
ADDITIONAL INFORMATION