You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Piyush-08-bot (via GitHub)" <gi...@apache.org> on 2026/09/05 17:02:52 UTC
[PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Piyush-08-bot opened a new pull request, #43935:
URL: https://github.com/apache/superset/pull/43935
**Fix:** Accept `**kwargs` in `SupersetMetastoreCache.__init__` and forward
them to `super().__init__()`, keeping the class compatible with both existing
and any future cachelib releases without needing to enumerate each parameter.
Fixes #43860
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend-only fix, no UI changes.
### TESTING INSTRUCTIONS
1. Install `flask-caching==2.5.0` and `cachelib==0.17.0` in the dev environment
2. Run: `pytest tests/unit_tests/extensions/test_metastore_cache.py -v`
3. All 4 tests should pass — including `test_metastore_cache_factory_with_ignore_delete_many_errors_kwarg` which reproduces the exact failure
### ADDITIONAL INFORMATION
- [x] Has associated issue: #43860
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] 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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5594018401
@Piyush-08-bot this stops the crash but doesn't fix the underlying problem: `super().__init__(default_timeout)` on line 48 still swallows `**kwargs` instead of forwarding it. So a `CACHE_CONFIG` with `ignore_delete_many_errors=False` silently becomes `True` once it hits `BaseCache`, which is what @sadpandajoe flagged a couple days back. Can you pass `**kwargs` through to `super().__init__()` and add an assertion that the value actually lands on the instance, not just that no TypeError is raised?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5554137551
<!-- Bito Reply -->
The current implementation accepts `**kwargs` in `SupersetMetastoreCache.__init__` but does not pass them to `super().__init__`. To ensure `ignore_delete_many_errors` is correctly utilized by `BaseCache`, you should update the constructor to pass `**kwargs` to the superclass. The regression test should then be updated to assert that the `BaseCache` instance correctly receives and applies these options.
**superset/extensions/metastore_cache.py**
```
) -> None:
super().__init__(default_timeout, **kwargs)
self.namespace = namespace
```
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5553383177
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "Piyush-08-bot (via GitHub)" <gi...@apache.org>.
Piyush-08-bot commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5596168814
Thanks @rusackas for the review. Since the underlying issue has already been resolved in #43875, I'll close this PR rather than duplicate the upstream fix. Appreciate the feedback on forwarding **kwargs to BaseCache.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5553535693
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43935?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 57.51%. Comparing base ([`1315f5f`](https://app.codecov.io/gh/apache/superset/commit/1315f5ff6bc08e61a30bae6b304e19829896db0d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d347dd5`](https://app.codecov.io/gh/apache/superset/commit/d347dd59beb5d4759fa3f6e3998c88b612e523b9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (1315f5f) and HEAD (d347dd5). Click for more details.
>
> <details><summary>HEAD has 18 uploads less than BASE</summary>
>
>| Flag | BASE (1315f5f) | HEAD (d347dd5) |
>|------|------|------|
>|python|17|1|
>|presto|3|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43935 +/- ##
===========================================
- Coverage 79.81% 57.51% -22.30%
===========================================
Files 2913 2913
Lines 170313 170326 +13
Branches 39480 39485 +5
===========================================
- Hits 135932 97965 -37967
- Misses 31859 71440 +39581
+ Partials 2522 921 -1601
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.50% <100.00%> (-0.01%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.50% <100.00%> (-44.71%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/43935/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43935?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43935:
URL: https://github.com/apache/superset/pull/43935#issuecomment-5554462816
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #43935:
URL: https://github.com/apache/superset/pull/43935#discussion_r3941750350
##########
superset/extensions/metastore_cache.py:
##########
@@ -44,6 +44,7 @@ def __init__(
namespace: UUID,
codec: KeyValueCodec,
default_timeout: int = 300,
+ **kwargs: Any,
Review Comment:
The new signature accepts these options, but `super().__init__(default_timeout)` discards them. A `CACHE_CONFIG` setting of `ignore_delete_many_errors=False` is silently changed to `True`, so `delete_many()` will not raise when a delete fails; should these kwargs be forwarded to `BaseCache` and the regression assert that behavior?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat [superset]
Posted by "Piyush-08-bot (via GitHub)" <gi...@apache.org>.
Piyush-08-bot closed pull request #43935: fix(cache): accept **kwargs in SupersetMetastoreCache for flask-caching 2.5.0 compat
URL: https://github.com/apache/superset/pull/43935
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org