One of the regressions in our pipeline fix was that Jenkins no longer
ends up on top of the results list. From a UX perspective pinning
first party results to the top of the list was very important, because
that's the first thing most people are looking for.
This reintroduces that, plus creates a stable (alphabetic) ordering of
all non first party reporters so that we get a stable reporting order,
and not an order that is merely based on who showed up first.
Change-Id: Idd38a047bc73bfe3d7ecc89291c10c0fefbfe665
During the refactor one of the accumulators wasn't renamed correctly,
which causes a full stop javascript break if we fall into that
conditional block. This fixes that typo.
Change-Id: Ib79805c87a3917d36b69e3b7d621c240b851f7b9
The hideci script previously tried to look up the pipeline of a CI
comment by parsing the typical format (from zuul). It would then
group on this pipeline name and consider multiple comments in one
pipeline to be rechecks.
This doesn't work when two different CI's both use the same pipeline
name. Only the latest CI would be shown.
Instead consider each CI+pipeline to be unique.
This change calls each CI in the results table by "CI Name + Pipeline".
Previously if no pipeline was supplied (eg if not using zuul),
"CI Name + 'check'" would be used. Now just "CI Name" will be displayed.
Change-Id: Ie0f90efeba95ab510dacfb6a0cbe437e9ad2afe0
Toggle CI button isn't present on pages from URL containing
patch set ranges. For example:
https://review.openstack.org/#/c/259360/2..3
Fixed by updating the regular expression used to enable toggle ci to
match URLs containing patch ranges.
Change-Id: I74a5516ccc9eb2feee446410caff0ec023769407
Gerrit 2.11 UI changed the divs for the comment info section.
The current use of innerHTML causes a TypeError[1] on page load
because the object is undefined. This change works for both
ver 2.8 and ver 2.11
[1] Uncaught TypeError: Cannot read property 'innerHTML' of undefined
Change-Id: Id6871f3b28218bbd0feff8640512566dd57ca150
In the Zuul review table added to gerrit in hideci, replace the
term "Review" with "Change" as it is more correct.
Change-Id: I34010ef651d7c3d41eaa73ae17791806cf6b56ac
This returns the optimized url for zuul, which should dramatically
drop the amount of data transfered out of zuul. It also uses the ajax
method which lets us ensure that we don't schedule another pass
through the loop until we completed the current request.
Add support for jquery visibility optimization
Change-Id: I0e50f07fd9165e7a45c2712f6b1c4b3601759cba
This reverts commit ff6d73b989c57db79bb53e82f814d651945c3ac6.
This brings back zuul inline status which is further optimized in
follow on patches. We do this in phases because it's a lot easier to
review that way.
It also introduces zuul_inline global control variable, so we can land
this turned off, and enable in the debugger to verify it's doing the
correct thing.
Change-Id: If951a4a05a7dfef7a6d0c8e15ed263ff0523165e
This provides the facility to leave tracing in hideci that won't
trigger by default, however if trying to debug bad behavior you can
enter the javascript console, set hide_ci_debug = true.
Change-Id: I42bf4e830256ee64eb726e3a82d805f7ca35e246
The system to add zuul status to gerrit pages is very inefficient
and is causing high load on the zuul server as well as poor
performance in browsers. Remove it until it can be reworked to be
more efficient.
This reverts commit 5be687279c6a5284a39e1e62e928b5cf5b359aa3.
This reverts commit 0118d2b4b53cea2641c123a57c14bf8276237f09.
Change-Id: I0ec03e9c585ecc53a839a7a03fa0171a3d28b873
There previous regex had a bug which meant that the Toggle CI button
and functionality wouldn't trigger when browsing to a change which
included the revision number. This updates the regex to match in those
conditions.
Change-Id: Icc3d580d063c3a64f9d2b7e7d6a46e67afe0c779
Modern browsers are not happy to retrieve plaintext HTTP content
when running in the context of an HTTPS-served page. When including
Zuul's status JSON blob from the Gerrit WebUI via hideci.js, use
HTTPS.
Change-Id: Ibafe2b210ecdebea1781192beb0f4a14a23121eb
This brings over a short summary of current zuul status for gerrit
changes. It is displayed above the test results table. And updates
every 10 seconds. If there are no outstanding changes in zuul, this
will hide the table where it's displayed.
This can be made more network efficient once
Ib8d80530cc99c222226f73046c17ab0bbf6e080b lands, however, it works
pretty quick in it's current format.
Co-Authored-By: Joshua Hesketh <josh@nitrotech.org>
Change-Id: Ice735926204d8cb972b68078e7ee23e56dce0b93
Use the same trick used in zuul status page to store a cookie
with the last state so when we load another review, we use the last
setting to show or hide the CI comments.
Change-Id: If912b88c3ad68c1dcaa086ad76abb54ecf5b576b
As gerrit is a big JS-based webapp, traditional hooks for executing code
on page-load (window.onload and friends) don't get executed on every
page as a user is exploring the UI. Instead we rely on the appearance
and disappearance of the "working..." message to know when a user is
looking at a new page. The test for this was not precise enough, which
was causing the ci_page_loaded function to be called twice on page load.
This patch changes the MutationObserver so that it only calls the
function once, by checking that it is the "style" attribute that has
changed. The other call was being triggered by a change to the
"aria-hidden" attribute.
Change-Id: If870d53b5760c140c84e5711ada94609a60e0cdb
The previous hideci enhancements and refactor was not tested on the
new change screen, which sadly removes all the semantic markup around
the displayed changes (boo gerrit).
Do the base parsing based on the looping over the p tags as was done
in the initial version instead of matching divs by semantic tags. A
few of the parsing functions needs to be adapted to know if they are
on old vs. new change screen (like finding the date).
Spot tested locally with new and old change screen, seems to be
working.
Change-Id: Ieadfb78fa4d152d12cb64fc69d808fa510d28abd
Change hideci to only show the most recent results of a pipeline. For
entries where the pipeline is not parsable we default to assuming the
results were in the 'check' pipeline.
3rd Party CI systems are assumed to be 'check' pipeline for the
purposes of this patch.
Order the display of these results for parsed pipeline entries first,
then non parsed entries after. That has the impact of making all the
Jenkins results be the top of the page and 3rd Party come later.
Also provide a (### rechecks) comment if we find more than 1 result at
the current patch set number. This helps reviewers understand that
this patch might be unstable as it's been rechecked to get to the
current state.
Change-Id: I153f73000f9392af6c8bbe850716645b3ba836a0
This is a refactors the hideci code into much smaller functions,
making the whole thing a bit more readable for fixing this going
forward. This was done in order to add a couple of new features. The
smaller functions should also make this code much easier to review.
After the refactor we now do a top down parsing of all comments in a
review, classifying them as 'is_ci' and 'is_trusted_ci' so that we can
more easily compute the results we want going forward.
In the process a few additional features were added.
1) CI results are only shown for the latest patch set, even if no CI
system has reported on it. This is accomplished via
ci_latest_patchset.
2) If CI system is in merge conflict, that's displayed in the results
box.
3) Test results records are lifted in total to the test results
display panel, and each set of test results includes the date that we
got it from. This means that for patches that get 'rechecked' a lot,
you'll see the whole history of test results on current patch. You
will also be able to quickly realize that the current test results are
older than the last recheck comment.
The UX for part 3 is different, and may need tweaking going forward,
however the merge of results from different runs was creating a lot of
confusion to reviewers, so this errors on the side of more clarity.
Because of the largely inconvenient workflow for development (the fact
that you basically need to copy / paste function definitions into
chrome dev console) this isn't broken up as smaller patches. This
should, hopefully, make future patches much easier on this code
though.
Change-Id: I3f128a449756fd6988f3810863cd1d49c476b0dd
Show the merge failure comment iff the reporting system is Jenkins
and it is the most recent comment.
If there is a displayed merge comment, do not display the results
table (as it is misleading).
Change-Id: I873a04112f180f296d6e21f6e26be7ac3574e047
Use jquery to scrape the comments for CI results and put them in
a table. Hide CI comments by default (the toggle button remains
so they can be displayed).
Change-Id: I2e1487e9482bfc3487ee2e94cb125f78d4d473a7
There are many CIs which automatically post comments in Gerrit and there
is no way to filter those out from the normal comments posted by
reviewers.
This patch adds a new "Toggle CI" button to the Gerrit interface which
shows/hides CI comments. The button is displayed only on review pages
and is hidden everywhere else.
Change-Id: I6ffca12d6314c63c0f1ab97d2c98a84a6ac790c9
Closes-Bug: 1282019