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

Install Plugin Step: Plugin Server side #456

Closed
wants to merge 5 commits into from
Closed

Install Plugin Step: Plugin Server side #456

wants to merge 5 commits into from

Conversation

neilkakkar
Copy link
Contributor

@neilkakkar neilkakkar commented Jun 3, 2021

Changes

Part of #405

So, this turned out to be a lot more involved than I imagined. Have decided to break it down into steps.

This is step 1: Create a new worker pool, with it's own vm/setup/everything.

PR is a proof of concept, very rough, need to clean everything up (and repeat myself less) - but wanted to get this out so you can see what's going on and comment on the approach.

For installation, our setup makes things such that there's only 1 plugin on the hub, which allows us to freely re-use other tasks as they stand. (as long as we don't mess up on reload - I'm thinking of banning reload on this thread).

Everytime a new task comes in, the install thread sets up the plugin, and returns if there's no problems. I've set things up so that this will be re-usable for #165 -> basically every time you want to test something, it begins with a fresh installation, running setup -> task -> teardown.

Some repetition is inevitable, but I think I've whittled it down to the minimum (except vm.ts, which will go away).

Also, naming is very much a WIP too


To investigate:

  1. Troubles with multiple pools
    2. Pools missing logs
  2. DRY

Checklist

  • Updated Settings section in README.md, if settings are affected
  • Jest tests

@neilkakkar
Copy link
Contributor Author

How I'm thinking of splitting the steps:

  1. Create celery task on Plugin server to accept install commands. (this PR)
  2. Update main PostHog to send install tasks on install (not upgrades - those come later, add on). Figure what to do on frontend when install fails (and how to show it)
  3. Update schemas / introduce Installation upgrades and testing with different source archives. (see #405 for more)

@neilkakkar neilkakkar requested a review from Twixes June 3, 2021 11:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants