From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Proxmox Datacenter Manager development discussion"
<pdm-devel@lists.proxmox.com>,
"Dominik Csapak" <d.csapak@proxmox.com>
Subject: [pdm-devel] applied: [PATCH datacenter-manager] server: tasks: fix filter order
Date: Fri, 22 Aug 2025 15:21:00 +0200 [thread overview]
Message-ID: <DC8ZKALDXARW.XJZBGIMRGJPK@proxmox.com> (raw)
In-Reply-To: <20250822121553.3255195-1-d.csapak@proxmox.com>
On Fri Aug 22, 2025 at 2:11 PM CEST, Dominik Csapak wrote:
> commit
> bd0babf (remote tasks: add background task for task polling, use new task cache)
>
> changed the order of filters applied to the task list, namely it put the
> skip and limit at the front of the filtering, instead of the back.
>
> Since we use these paramters in the ui to batch loads, we don't want to
> first limit our numbers and then filter on them, but first apply the
> filters and then limit the amount, otherwise we could never show older
> tasks when filtered.
>
> An example:
>
> Assume the ui usess 'limit=5' to batch the loads
> if the user wants to show only those tasks with 'statusfilter=warning'
>
> but we first have 10 'OK' tasks, we'd never show anything, since the api
> would return an empty list, even if we'd have multiple warning tasks
> after that.
>
> In contrast if we filter first and then limit the number/apply the
> offset, we would get the first five tasks that ended with a warning,
> like we would expect.
>
> To fix that, move the skip/take filters at the end.
>
Oops, good catch!
Looks good to me, applied :)
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
prev parent reply other threads:[~2025-08-22 13:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 12:11 [pdm-devel] " Dominik Csapak
2025-08-22 13:21 ` Lukas Wagner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DC8ZKALDXARW.XJZBGIMRGJPK@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox