kidusmakonnen opened a new pull request, #28737:
URL: https://github.com/apache/superset/pull/28737

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   We identified an issue where FileSystemCache is used, setting values for 
`table_cache_timeout` and `schema_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` and 
`schema_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
   
   
https://github.com/apache/superset/assets/8809047/86dd8c56-0015-4450-ad51-bb49e7f85f2b
   
   After
   
   
https://github.com/apache/superset/assets/8809047/88c1f072-1637-47d6-9510-52a4b85556dd
   
   
   
   ### TESTING INSTRUCTIONS
   1. Ensure CACHE_CONFIG is set to use FileSystemCache in 
config.py/superset_config.py
   2. Go to Settings &rarr; Database Connections
   3. Edit a DB connection
   4. Go to Advanced &rarr; Performance
   5. Set values to `SCHEMA CACHE TIMEOUT` and `TABLE CACHE TIMEOUT`
   6. Go to SqlLab, select the DB you edited
   7. Try to refresh the schema list and table list
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: Fixes #28735 
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to