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

   ### SUMMARY
   
   Flask-Caching 2.5 passes `ignore_delete_many_errors` to custom cache 
backends during initialization. Accept and forward backend keyword arguments in 
`SupersetMetastoreCache` so initialization succeeds and `CACHE_IGNORE_ERRORS` 
is honored.
   
   On master, application initialization also fails when 
`SupersetCache._memoize_make_cache_key` supplies `timeout` and `forced_update`, 
which Flask-Caching 2.5 removed from this helper. Forward version-specific 
options only when supplied by the caller, preserving the configured hash method 
and compatibility with Flask-Caching 2.4.1.
   
   Fixes #43860. Related to #43935; this change also forwards backend options 
to the base class and addresses the memoization startup failure.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; backend-only change.
   
   ### TESTING INSTRUCTIONS
   
   ```sh
   pytest tests/unit_tests/extensions/test_metastore_cache.py 
tests/unit_tests/utils/test_cache_manager.py -q
   ```
   
   Verified on Python 3.12.14 / Windows with the repository's application 
fixtures enabled:
   
   - Flask-Caching 2.5.0 / cachelib 0.17.0: 17 passed.
   - Flask-Caching 2.4.1 / cachelib 0.13.0: 16 passed, 1 version-specific test 
skipped.
   - Before the fixes, isolated tests reproduced both constructor and 
memoization `TypeError` failures.
   - Coverage includes backend initialization, timeout/namespace/codec 
preservation, error-option propagation and override, cache hits, forced 
refresh, invalidation, and expiration.
   - Ruff checks and formatting passed. Pylint with Superset plugins passed on 
both production files. Mypy with `--platform linux --check-untyped-defs` passed 
on all four changed files.
   
   The unmodified pre-commit invocation has Windows limitations: mypy reports 
three existing `signal.SIGALRM`/`signal.alarm` errors in 
`superset/utils/core.py`, and the pylint hook requires `bash`. The direct 
Linux-target mypy and direct pylint checks above passed. The full repository 
suite and a released 6.1.0 installation were not tested.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #43860
   - [ ] 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