[all] Dynamic Zuul results table in Gerrit 3
Hello Fellow OpenStack and OpenDev Folks! TL;DR click on [3] and enjoy. I am starting this thread to not hijack the discussion happening on [1]. First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended). I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others. I hope you will enjoy this little helper (I do). I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering. Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e Kind regards, -yoctozepto
W dniu 03.12.2020 o 10:22, Radosław Piliszek pisze:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Rename to *.user.js so Tampermonkey will recognize it as userscript and add window around with Install button.
However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Firefox with Tampermonkey - script works.
I hope you will enjoy this little helper (I do).
Nice job! It does not catch all Zuul jobs. For Kolla patches AArch64 jobs are not listed.
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
YW.
On Thu, Dec 3, 2020 at 10:33 AM Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> wrote:
W dniu 03.12.2020 o 10:22, Radosław Piliszek pisze:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Rename to *.user.js so Tampermonkey will recognize it as userscript and add window around with Install button.
I, personally, hate this "feature" of Tampermonkey but sure - if it makes it easier for you. ;-) Done. Anyone - just click on "Raw" and you will be pestered by Tampermonkey to install the script.
However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Firefox with Tampermonkey - script works.
Yay, thanks for confirming!
I hope you will enjoy this little helper (I do).
Nice job!
Well, thank you! :-)
It does not catch all Zuul jobs. For Kolla patches AArch64 jobs are not listed.
I have already replied on IRC but will repeat here for others. The dynamic part includes all the running queues. However, the static part parses only a single comment and AArch64 is in a different one. I am obviously biased (being x86-only folk) but I find it more problematic than worth it to hack it any further. I hope a proper solution arrives sooner. :-)
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
YW.
-yoctozepto
Hi, On Thu, Dec 3, 2020 at 2:57 PM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Thanks, Works for me in firefox with Greasemonkey. The only difference I noticed wrt previous gerrit one is that the current one displays both already available zuul results(from previous run) and the current running one, which is fine.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
Thanks and Regards Yatin Karel
On Thu, Dec 3, 2020 at 10:44 AM Yatin Karel <ykarel@redhat.com> wrote:
Hi,
On Thu, Dec 3, 2020 at 2:57 PM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Thanks, Works for me in firefox with Greasemonkey. The only difference I noticed wrt previous gerrit one is that the current one displays both already available zuul results(from previous run) and the current running one, which is fine.
Yay, thanks for confirming. Yes, I obviously forgot all the little changes I made but this is one of them. I somehow like it better like this. The styling is not perfect now to differentiate between the two tables but it can be figured out based on the contents.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
Thanks and Regards Yatin Karel
-yoctozepto
On Thu, Dec 3, 2020 at 11:03 AM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
... I obviously forgot all the little changes I made ...
Just remembered one so writing down for posterity. One of the enhancements is that it supports multiple tenants, i.e. it works for non-openstack/ namespaces, e.g. x/, opendev/ or zuul/ too. -yoctozepto
On Thu, 2020-12-03 at 13:16 +0100, Radosław Piliszek wrote:
On Thu, Dec 3, 2020 at 11:03 AM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
... I obviously forgot all the little changes I made ...
Just remembered one so writing down for posterity. One of the enhancements is that it supports multiple tenants, i.e. it works for non-openstack/ namespaces, e.g. x/, opendev/ or zuul/ too.
the main issue i still see with this script is it only looks a zuul comments so im worried that if too many peopel install it they will not look at the thirdparty ci result becaue they are uesed to the old ui where they are there. it works on firfox with code injector too by the way. the running job bit is nice nova-multi-cell RUNNING (100%) nova-next RUNNING (65%) but really i hope we can come to a solution server side that will work for all CIs these clinet side scripts are nice and i like that the running job links go to the job console like they do on the zuul web interace but we really do need to make sure the thirdpary cis are support just as much as the first party on.
-yoctozepto
On Thu, Dec 3, 2020 at 2:29 PM Sean Mooney <smooney@redhat.com> wrote:
On Thu, 2020-12-03 at 13:16 +0100, Radosław Piliszek wrote:
On Thu, Dec 3, 2020 at 11:03 AM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
... I obviously forgot all the little changes I made ...
Just remembered one so writing down for posterity. One of the enhancements is that it supports multiple tenants, i.e. it works for non-openstack/ namespaces, e.g. x/, opendev/ or zuul/ too.
the main issue i still see with this script is it only looks a zuul comments so im worried that if too many peopel install it they will not look at the thirdparty ci result becaue they are uesed to the old ui where they are there.
Yes, this is the original limitation. This is analogous to hrw's comment about AArch64. Open to contributions. :-) I am pretty sure it would be best to treat this as a PoC and build a proper solution on Gerrit's side. As for dynamic results - I bet it is even trickier to handle the TP solutions.
it works on firfox with code injector too by the way.
++ -yoctozepto
On Thu, Dec 3, 2020 at 4:22 AM Radosław Piliszek <radoslaw.piliszek@gmail.com> wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I just set it up and it's awesome. Perhaps this could somehow make it's way into a Gerrit plugin so it can be available for all users.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
-- Mohammed Naser VEXXHOST, Inc.
On Thu, Dec 03, 2020 at 10:22 Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Hello It seems like this script is injecting build details directly using the innerHTML attribute without filtering html entities, please see the `Security considerations` section of https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML -Tristan
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
On Thu, Dec 3, 2020 at 2:38 PM Tristan Cacqueray <tdecacqu@redhat.com> wrote:
On Thu, Dec 03, 2020 at 10:22 Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Hello
It seems like this script is injecting build details directly using the innerHTML attribute without filtering html entities, please see the `Security considerations` section of
https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
Yes, it is a generally valid remark but I consider both Gerrit and Zuul (both of OpenDev) to have the exact same level of trust so did not modify the approach. But yes, for anyone trying to learn best practices from this snippet - please do not, it is far from them. :-) In general this approach is very wasteful as it causes rebuilding (or rather rejoining) and reparsing of html, instead of DOM manipulations. For such a simple table it does not hurt but please do not do it at home. -yoctozepto
Sorry to respond to such an old thread, but figured the context might help. Sometime in the past couple of months, the Zuul status script (thanks Radoslaw!) that's run in the tamper/greasemonkey browser extension stopped working. Not sure if anyone else noticed and/or has a workaround for it, I'm just not good enough with javascript to fix it myself :( Thanks, -Brian On 12/3/20 04:22, Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
participants (7)
-
Brian Haley
-
Marcin Juszkiewicz
-
Mohammed Naser
-
Radosław Piliszek
-
Sean Mooney
-
Tristan Cacqueray
-
Yatin Karel