Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 404 - Error while retrieving tasks #1482

Open
2 tasks done
makdeuneuv opened this issue Apr 25, 2023 · 5 comments
Open
2 tasks done

Error 404 - Error while retrieving tasks #1482

makdeuneuv opened this issue Apr 25, 2023 · 5 comments
Labels
api REST API bug Something isn't working enhancement New feature or request

Comments

@makdeuneuv
Copy link
Contributor

Description

When we go to the task page, we get a 404 error - StudyNotFoundError.
This happened when a user deleted a variant on which a simulation was running. It's impossible to cancel this task.

Steps to Reproduce

  1. Create a managed study
  2. create a variant and made some modifications on this variant
  3. launch a simulation on this variant
  4. wait a moment, when the simulation is started on CALIN, go delete the variant
  5. come back on task page and now you get the 404 error
  6. In some case, the task will be done a few moment later (in staging) or it will never ended (in production)

Screenshots

image
image

Possible Solution

No control is made when deleting a variant or a study.
It would be necessary to prevent the deletion of a study (variant or not) when this one has one or more simulations in progress.
Another solution could be, when a user makes a call to the deletion function of a study (web app or API), this same function will first stop the simulations in progress before being deleted.

Environment

  • Production
  • Staging
@makdeuneuv makdeuneuv added bug Something isn't working enhancement New feature or request api REST API variante labels Apr 25, 2023
@MartinBelthle
Copy link
Contributor

MartinBelthle commented Jul 18, 2023

What could be done :

  1. Before deleting a study, kill every job associated to it because they are now useless and prevent other studies to be launched. This requires a bit of development in the back-office but not in the front.
  2. When clicking on the "Tasks" tab, filter task with the parameter filter_orphans=True. Currently, this parameter value is False and it is a nonsense to me. Changing it to True will prevent tasks with deleted studies to appear in the front-office. The parameter already exists and the only change to do will be in the front. This would also solve this issue Presence of tasks from a deleted study in the task view. #1470

Does this solution suits you @deneuv ?

@MartinBelthle
Copy link
Contributor

Also, from what i have tested, this doesn't only apply to variant but to raw studies as well so i remove the variant label.

@laurent-laporte-pro
Copy link
Contributor

  1. Before deleting a study, kill every job associated to it because they are now useless and prevent other studies to be launched. This requires a bit of development in the back-office but not in the front.

Not sure. There can also be an impact on the front-end side, as some objects are saved in the web browser's Data Store.

@MartinBelthle
Copy link
Contributor

I'm not sure to understand how launcher jobs are saved in the web browser's Data Store. I thought we could just get every job associated to the study the same way the API does and kill each one.

@makdeuneuv
Copy link
Contributor Author

@MartinBelthle I think the solution 2 is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants