-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended #20219
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
base: main
Are you sure you want to change the base?
Conversation
…tten when in debug mode when not intended
Looks like this was changed in #18021 to automatically clear cache on startup. We may want to revisit this completely as this could hit way more then just swagger. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the optimal way to approach this. cache.clear()
might be called elsewhere (including by plugins), so we need to ensure that the active configuration is always reset correctly in case the entire cache is cleared. This will probably require tweaking the initialization logic for the Config
class.
I was kind of wrestling with this as well. As the |
Thoughts on adding a This would remove some of the non-concrete logic we have going on (based on the last config saved). Alternatively, have a date which we utilize instead. |
Hey @DanSheps , I've been thinking about this PR and Jeremy's feedback about needing to address the broader architectural issue rather than just the debug mode cache clearing. And really, I think the issue as reported is a bit off--I think the caching issue has just be papering over the flawed "assume the most recent config revision is active" approach. I think you have identified the core of a clean solution that addresses Jeremy's concerns while being doable for v4.4.1. Thinking about it seems like we would need to do at least the following:
Given the Tuesday deadline for including this in v4.4.1, I wanted to check: do you still want to implement this approach, or would you prefer I take ownership? |
I think I can get that done by Tuesday |
Turns out, I had most of this done... lol |
…-in-debug-mode' into 19825-fix-config-revision-revert-in-debug-mode
…o 19825-fix-config-revision-revert-in-debug-mode
…igration logic and add comments * Revise config initialization to be more explicit * Remove old gating of cache.clear() * Add comments to migration * Clean up migration
Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended