Skip to content

Conversation

@SchrodingersGat
Copy link
Member

Remove PluginConfig objects which have not been matched with a valid for 30 days.

Prevents potential "accumulation" of old plugin configuration objects in the database if the plugin has been removed,
without clearing them out too aggressively.

- Add plugin migration file
- Automatically update the "last_updated" date if a matching plugin is discovered
- Any which have not seen a matching plugin in 30 days will be removed
@SchrodingersGat SchrodingersGat added the plugin Plugin ecosystem label Oct 3, 2023
@SchrodingersGat SchrodingersGat added this to the 0.13.0 milestone Oct 3, 2023
@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for inventree canceled.

Name Link
🔨 Latest commit 829e72a
🔍 Latest deploy log https://app.netlify.com/sites/inventree/deploys/651ba3b4b6ed3700084a4fe7

@SchrodingersGat
Copy link
Member Author

@matmair LMK what you think of this approach

@wolflu05
Copy link
Member

wolflu05 commented Oct 3, 2023

Would that mean if a instance is running for 30 days without any restart, the plugin config gets deleted?

I would rather add a toggle to the uninstall dialog which says remove all data.

@matmair
Copy link
Contributor

matmair commented Oct 3, 2023

I am not sure I see how this is a real improvement of resources. This adds a lot more compute usage with the constant calculations and task runs for saving then a few KB of storage for database settings.
Not to forget that this is a change in the default behavior and therefore will probably have unforeseen consequences.

@SchrodingersGat
Copy link
Member Author

Fair points - this has been replaced by #5653

@SchrodingersGat SchrodingersGat deleted the plugin-clean-config branch October 3, 2023 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin Plugin ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants