que-web icon indicating copy to clipboard operation
que-web copied to clipboard

Failing jobs "Delete all" does not respect search

Open owst opened this issue 5 years ago • 0 comments

Using a search query on the failing jobs page correctly restricts the displayed jobs. Upon pressing "Delete All" the prompt asks "Delete all N jobs?" where N is the count of jobs restricted by the search, however, upon confirming the deletion all failing jobs are deleted, whether matched by the search query, or not.

As an example, with the following jobs (which are failing as I have not created the corresponding classes):

postgres@localhost:backend> SELECT job_class, error_count FROM que_jobs
+-------------+---------------+
| job_class   | error_count   |
|-------------+---------------|
| FooQueJob   | 4             |
| FooQueJob   | 4             |
| BarQueJob   | 4             |
+-------------+---------------+

the failed job page shows: Screenshot 2020-09-07 at 17 10 23 and if we search for "Foo" it shows: Screenshot 2020-09-07 at 17 10 42 if we press "Delete All" we are asked: Screenshot 2020-09-07 at 17 11 06 pressing "Ok" we see (after clearing the search) Screenshot 2020-09-07 at 17 11 53 and indeed, all the jobs have been deleted, not just those matching "Foo":

postgres@localhost:backend> SELECT job_class, error_count FROM que_jobs
+-------------+---------------+
| job_class   | error_count   |
|-------------+---------------|
+-------------+---------------+

N.b. we are pinned to que-web 0.7.1, since we have not yet upgraded to Que 1.X

owst avatar Sep 07 '20 16:09 owst