Skip to content

Conversation

DanSheps
Copy link
Member

@DanSheps DanSheps commented Sep 1, 2025

Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended

  • Obtain the current config revision information
  • Reinitialize that information when app is restarted in debug mode

…tten when in debug mode when not intended
@DanSheps DanSheps requested a review from a team September 1, 2025 15:35
@DanSheps DanSheps self-assigned this Sep 1, 2025
@DanSheps DanSheps requested review from jeremystretch and removed request for a team September 1, 2025 15:35
@DanSheps
Copy link
Member Author

DanSheps commented Sep 1, 2025

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.

Copy link
Member

@jeremystretch jeremystretch left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In debug mode (only); executing any ./manage.py command resets the current configuration revision to #1.
2 participants