edurange / edurange3

A major overhaul of eduRange; features a pure API with Flask, Client Side Rendering with React, token-based auth strategy, containerized scenarios with Docker, NodeJS websocket microservices, and more.
4 stars 2 forks source link

Frequently unable to delete scenarios #60

Open crowllx opened 1 month ago

crowllx commented 1 month ago

I believe it occurs whenever there is bash history present but I have not confirmed this.

This is the output I see in npm

Destroy complete! Resources: 4 destroyed.
127.0.0.1 - - [24/Jul/2024 14:50:27] "POST /api/scenario_interface HTTP/1.1" 200 -
[FLASK] 127.0.0.1 - - [24/Jul/2024 14:50:30] "POST /api/scenario_interface HTTP/1.1" 500 -
[FLASK] 127.0.0.1 - - [24/Jul/2024 14:50:41] "POST /api/scenario_interface HTTP/1.1" 500 -

the 'destroy complete' is from stopping the scenario, the post requests returning 500 are me trying to delete it

cookjackc commented 1 month ago

As far as I'm aware, the destroy function does not interact with chat_history or bash_history, which as foreign key dependencies to scenarios prevents them from being deleted.

We may want to add a column to scenarios akin to "is_archived", whereby instead of scenarios actually being deleted and data discarded, we simply mark them to not be displayed in the interface. This would possibly have the side effect of causing more confusion though, if an instructor tries to reuse scenario names and doesn't realize they have archived scenarios.