commit | d42db3a8267aae4c61de3ed7a7908538990bc552 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue Jul 23 08:55:02 2019 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Thu Aug 01 10:53:22 2019 +0200 |
tree | 094d6dc1ff274c9a7ed3d4f9fdc92b4fb64e531a | |
parent | 321ecc8711ea537b177c4e8243ffb041edbb732c [diff] |
Ensure that submittability info of change is refreshed when check is created/updated If a user loaded a change screen in the browser and then a check was created/updated that changed the submittability of the change, the new submittability info was not reflected on the change screen if the user reloaded the screen. This was because the browser remembers the ETag for the change details and the ETag for the revision actions, and the ETag computation didn't consider the checks of the change. Fix this by implementing the ChangeETagComputation extension point that allows to provide a value for the change ETag computation. Since all checks of a change are stored in a single ref, we can just return the SHA1 of this ref to ensure that the change ETag changes each time when a check is created or updated. Strictly speaking this changes the change ETag a little too often, since we need a new change ETag only if the submittability of the change changes, which only happens when the combined check state changes (and not all check updates affect the combined check state). This is fine for now and may be optimized later. The implementation of ChangeETagComputation delegates to Checks to do the actual computation of the ETag because this computation is specific to NoteDb and all NoteDb-specifics are hidden behind the Checks and ChecksUpdate interfaces. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I98f3198986c0a543321d56ae15d4332691248b56
This plugin provides a unified experience for checkers (CI systems, static analyzers, etc.) to integrate with Gerrit Code Review.
This plugin uses polymer-cli to test.
After bower install
, running polymer test -l chrome
will run all tests in Chrome, and running polymer serve
and navigating to http://127.0.0.1:8081/components/checks/gr-checks/gr-checks-view_test.html allows for manual debugging.