taskcluster / taskcluster-tools

Tools for debugging, inspecting and managing Taskcluster
https://tools.taskcluster.net/
Mozilla Public License 2.0
26 stars 91 forks source link

Bug1474953 show worker despite unknown tasks reverse tasklist #585

Closed davehouse closed 5 years ago

davehouse commented 5 years ago

The taskcluster.queue.getWorker(https://docs.taskcluster.net/docs/reference/platform/taskcluster-queue/references/api#getWorker) recentTasks list is usually in reverse chronological order. And we sort by default in reverse chronological order. So, reverse the list when we get it and before we manually sort the elements.

davehouse commented 5 years ago

@helfi92 I'm sorry my github understanding is rusty, and I misunderstood the diff it showed me (with the already-merged changes).

davehouse commented 5 years ago

When I test this change locally, it fixes the ordering when elements do not have times. Since it is still applying the .sort(), I think this does not create a new problem if the api results change and are not in the same order (we'd just see the undefined tasks out of order again).

helfi92 commented 5 years ago

You'll need to rebase on master. From your branch, I think you can do:

git pull https://github.com/taskcluster/taskcluster-tools.git master --rebase
git push origin bug1474953_show-worker-despite-unknown-tasks_reverse-tasklist -f

Hopefully there will be no conflicts when rebasing. If there are, you will need to fix the conflicts after git pulling and then git add <file> followed by git rebase --continue. Let me know if that works.

davehouse commented 5 years ago

I tried a rebase, but that would reapply my other commits and causes merge conflicts. So I re-made the change since it was a single line. https://github.com/taskcluster/taskcluster-tools/pull/586