This repository was archived by the owner on Nov 4, 2021. It is now read-only.
Retry plugin initialization before punishing - #460
Merged
Merged
Conversation
Twixes
reviewed
Jun 8, 2021
Contributor
Author
|
Should I merge? @Twixes |
fuziontech
pushed a commit
to PostHog/posthog
that referenced
this pull request
Oct 12, 2021
…/plugin-server#460) * WIP Retry plugins when punishing * update retry ms time * add tests * fix tests * minor style fixes * minor tweaks * address review points * fix tests * Slightly clarify `initVm` Co-authored-by: Michael Matloka <dev@twixes.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changes
Retrying plugin VM initialization with exponential backoff before ultimately disabling the plugin.
Resolves #387
The approach here is simply to reset the
resolveInternalVmpromise with timeouts using an exponential backoff mechanism such that the plugin will continue to be enabled, but the user will see an error, and its methods will return null (i.e. none of its methods will run or affect anything) for the whole time while we retry until that promise gets resolved to avmor we cap out at 15 retries.I followed the suggestion in #387 but I'm thinking ~24h (15 retries) is a bit much - thoughts?
Checklist