pushkin-consortium / pushkin

A customizable, scalable ecosystem for massive online psychological experiments
https://pushkin-consortium.github.io/pushkin/
MIT License
24 stars 10 forks source link

Limitations to `remove experiment` in delete mode #348

Open jessestorbeck opened 4 months ago

jessestorbeck commented 4 months ago

As noted in the docs, deleting an experiment currently requires a complete local reset of Docker. Ideally, deleting an experiment would be more targeted and drop the tables for the relevant experiment(s) from the database. This should be doable with some digging into how the CLI handles knex migrations; previously, it was simply more expedient to run kill, since local test data seemed unlikely to be critically important.

Additionally, deleting an experiment currently still leaves some traces in the site. Ideally, the experiment's _web and _api components should be removed as dependencies and the API component should be removed from controllers.json. There may be other leftover vestiges of the experiment also which I haven't noticed.

jkhartshorne commented 4 months ago

If the issue is just about the database, then that should be simple. It's actually the kind of thing that knex is built for.

When doing this, I recommend as a fail safe that the table be downloaded before dropped. That's not necessary for local deploy but is something we'll want for AWS ... so we'll want to be able to test it!

On May 28, 2024, Sebastian Waz @.***> wrote:

As noted in the docs https://pushkin- consortium.github.io/pushkin/latest/packages/pushkin-cli/#remove- experiment, deleting an experiment currently requires a complete local reset of Docker. Ideally, deleting an experiment would be more targeted and drop the tables for the relevant experiment(s) from the database. This should be doable with some digging into how the CLI handles knex migrations; previously, it was simply more expedient to run kill, since local test data seemed unlikely to be critically important.

Additionally, deleting an experiment currently still leaves some traces in the site. Ideally, the experiment's _web and _api components should be removed as dependencies and the API component should be removed from controllers.json. There may be other leftover vestiges of the experiment also which I haven't noticed.

— Reply to this email directly, view it on GitHub https://github.com/pushkin-consortium/pushkin/issues/348, or unsubscribe https://github.com/notifications/unsubscribe- auth/ABOVVY4HGE5OOVGKS7GMJDTZESAYZAVCNFSM6AAAAABIM6DWYOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZDCMBWG44DOMI. You are receiving this because you are subscribed to this thread.Message ID: @.***>