Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Retries when punishing plugins #387

Description

@mariusandra

New issue for thoughts and future work (retries) on merged PR #380

One change (nit?) I would have done is to pass pluginConfig to disablePlugin directly, instead of via plugin_id and team_id. This would also simplify the SQL query, since we would just need to check for id = pluginConfig.id.

Regarding the points in the PR:

Do we want to allow users to re-enable plugins that failed on setup even though they haven't changed at all? i.e. prevent a user from keeping on enabling a plugin that we know will fail.

If the API my plugin talks to fails for reasons outside of my control (or in control, but external, e.g. not enough credits for an API), I'd like to re-enable the plugin without needing to reinstall it :). So yes.

Do we want a retry strategy for setupPlugin? How many retries?

I think we do. With the merged implementation we will accidentally punish good plugins. Knowing how the system works after that PR, I would be very careful with making any network requests inside setupPlugin, as any accidental network glitch (api is down for 5min) will disable the plugin completely. Basically, if my plugin won't start because "Your account is suspended due to lack of payment method.", I'd like it to try again at a later date. However if my plugin won't start because "invalid api key", I'd like it to be totally disabled.

I think the answer is to put this on plugin authors. You either throw a RetryError (will be retried) or anything else (will be disabled). That's what Segment does at least.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions