Closed djmitche closed 6 years ago
Created https://github.com/taskcluster/taskcluster-web/issues/221 to show a spinner when loading clients.
From the description in #222, I don't think this is fixed. The problem isn't that I've reached the end of the results. The problem is that the >
button doesn't take me to the next page of results. For a list with more results, try searching for project/
. You'll get back four results, none of which start with project/taskcluster
. Yet in the STR above there are at least 12 clients with that prefix. Clicking ">" does nothing.
This may be a bug in taskcluster-auth
. Paginating with a prefix does not return results after the first fetch.
I ran
const taskcluster = require('taskcluster-client');
const main = async () => {
const auth = new taskcluster.Auth({rootUrl: 'https://taskcluster.net'});
let req = {prefix: 'project', limit: 10};
while (1) {
console.log('--batch--');
const res = await auth.listClients(req);
for (let {clientId} of res.clients) {
console.log(clientId);
}
req.continuationToken = res.continuationToken || undefined;
}
};
main().catch(err => console.error(err));
and got
:!node foo.js
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
--batch--
project/autophone/bitbar-x-perf-g5
project/autophone/bitbar-x-perf-p2
project/autophone/bitbar-x-unit-g5
project/autophone/bitbar-x-unit-p2
project/autophone/sophie-unit-gs3
project/comm/thunderbird/releng/scriptworker/balrogworker/dev
project/comm/thunderbird/releng/scriptworker/balrogworker/prod
project/comm/thunderbird/releng/scriptworker/beetmover/dev
project/comm/thunderbird/releng/scriptworker/beetmover/prod
project/comm/thunderbird/releng/scriptworker/bouncer/dev
--batch--
project/comm/thunderbird/releng/scriptworker/bouncer/prod
project/comm/thunderbird/releng/scriptworker/shipit/dev
project/comm/thunderbird/releng/scriptworker/shipit/prod
project/comm/thunderbird/releng/scriptworker/signing/dep
project/comm/thunderbird/releng/scriptworker/signingworker
project/comm/thunderbird/releng/scriptworker/tb-treescript-comm/prod
project/comm/thunderbird/releng/scriptworker/tb-treescript-comm-dev
project/deepspeech/worker/lepotato-1
project/deepspeech/worker/lepotato-2
project/deepspeech/worker/lepotato-3
...
which is to say, with pagination and filtering, some of the pages are empty. Empty pages are A-OK in the TC pagination scheme (and can be paged past with the continuationToken).
STR:
project/taskcluster