Skip to content
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

Expose config change handler to Plugin, instead of deleting and re-creating #39

Open
gigxz opened this issue Apr 30, 2021 · 0 comments
Open
Labels
enhancement New feature or request for metagov-core priority: low low priority

Comments

@gigxz
Copy link
Collaborator

gigxz commented Apr 30, 2021

When the configuration of an active plugin changes, metagov-core deletes the plugin instance and creates a brand new one. This means that all the plugin state is lost. This might not be desirable for some plugins that use state to persist data that is updated via actions (see the "revshare" plugin).

Instead of deleting and recreating plugins, expose a handler that lets the plugin author decide what should happen when the config is changed.
Related to discussion #16.

Relevant code in core:
https://github.com/metagov/metagov-prototype/blob/70e8b4752e82b1bfc11dd3274071acd5734ce94c/metagov/metagov/core/serializers.py#L30-L34

@gigxz gigxz added the enhancement New feature or request for metagov-core label Apr 30, 2021
@gigxz gigxz changed the title Expose config change handler to Plugin instead of deleting and re-creating Expose config change handler to Plugin, instead of deleting and re-creating Apr 30, 2021
@shaunagm shaunagm added the triage label Dec 7, 2021
@shaunagm shaunagm added priority: low low priority and removed triage labels Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for metagov-core priority: low low priority
Projects
Status: 🦑. Backlog
Development

No branches or pull requests

2 participants