copr icon indicating copy to clipboard operation
copr copied to clipboard

frontend, backend: fix traceback for non-existing tasks

Open FrostyX opened this issue 3 years ago • 7 comments

Fix #2390

First, take a look at the frontend change. The BuildsLogic.get_srpm_build_task never raises an exception. It returns None for non-existing tasks instead. The route therefore returns 200 status code even for non-existing tasks, and simply returns nil. I am changing this to return 404 instead.

This prompted the backend changes because exceptions started appearing.

FrostyX avatar Nov 29 '22 20:11 FrostyX

Would you mind bumping MIN_FE_BE_API?

praiskup avatar Nov 29 '22 20:11 praiskup

Why backend even asked for those build IDs?

praiskup avatar Nov 29 '22 20:11 praiskup

Why backend even asked for those build IDs?

I am thinking of something like

  1. User submitted a build
  2. Backend added it to its priority queue
  3. Because of one of the post-release bugs, the building was stuck
  4. User deleted the build because it wasn't working
  5. Before updating the priority queue, backend picked the build and started it

I need to check if this was the case and if this situation can happen. If yes, we should fix it.

FrostyX avatar Nov 29 '22 20:11 FrostyX

I am thinking of something like

Now it looks more like an issue caused by #2398.

FrostyX avatar Nov 29 '22 21:11 FrostyX

So are we going to skip this PR then?

praiskup avatar Nov 29 '22 22:11 praiskup

We should probably skip this for the next mini-release. But the change is valid, I think.

FrostyX avatar Nov 29 '22 22:11 FrostyX

Thank you for this patch, it makes the code more robust..

praiskup avatar Dec 03 '22 16:12 praiskup