Include patchset in mapping of Gerrit changes to run IDs |
|||
Issue descriptionBackground: Each patchset of a Gerrit change can have a separate set of analyzer runs; users may want to view Tricium run progress state for previous patchsets. Currently, ProgressRequest includes the patchset (revision), and this is already sent by the tricium plugin; however, in the Tricum service, Gerrit changes (without patchset) are mapped to the latest run ID. Proposal: Add the revision string (which includes patchset) to the keys in the mapping of Gerrit changes to run IDs. Possible choices: - We could include just patchset number rather than the revision string - We could still maintain a mapping of gerrit change (without revision) to run ID for latest patchset.
,
Jan 27 2018
,
Jan 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/gerrit-plugins/tricium/+/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f commit 0e840af8da55ecf107c294c75eb2caf9d4aa5d0f Author: Quinten Yearsley <qyearsley@chromium.org> Date: Mon Jan 29 23:48:02 2018 Show patchset number in Tricium plugin UI. In this CL: Add a method which returns a string to display in the UI showing the patchset number, and add an observer method for the `revision` property which causes the results to be refreshed. Bug: 806532 , 764659 Change-Id: I40ef12afda0f920c407a3b2b6a9641450e28e83a Reviewed-on: https://chromium-review.googlesource.com/892023 Reviewed-by: Nodir Turakulov <nodir@chromium.org> Reviewed-by: Aaron Gable <agable@chromium.org> [modify] https://crrev.com/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f/test/tricium-view_test.html [modify] https://crrev.com/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f/test/example.html [modify] https://crrev.com/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f/src/main/resources/static/tricium-view.html [modify] https://crrev.com/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f/test/index.html [modify] https://crrev.com/0e840af8da55ecf107c294c75eb2caf9d4aa5d0f/src/main/resources/static/tricium-view.js
,
Jan 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/41b3be13fb2ad3391f9854b31e0fd478127db15c commit 41b3be13fb2ad3391f9854b31e0fd478127db15c Author: Quinten Yearsley <qyearsley@chromium.org> Date: Mon Jan 29 23:59:22 2018 [Tricium] Include revision in Gerrit mapping ID Reason: Users may want to view users may want to view Tricium run progress for previous patchsets, which would show for example which analyzers failed or had comments. It might be confusing if the progress for the latest patchset is always shown even if one is viewing previous patchsets. In order to support this, the revision string needs to be included in the Gerrit change strings that are mapped to run IDs. Bug: 806532 Change-Id: I541eb692bb3ea2bf5f5fc5ccac56e24d55e180f6 Reviewed-on: https://chromium-review.googlesource.com/890461 Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/41b3be13fb2ad3391f9854b31e0fd478127db15c/go/src/infra/tricium/appengine/frontend/rpc_progress_test.go [modify] https://crrev.com/41b3be13fb2ad3391f9854b31e0fd478127db15c/go/src/infra/tricium/appengine/frontend/rpc_analyze.go [modify] https://crrev.com/41b3be13fb2ad3391f9854b31e0fd478127db15c/go/src/infra/tricium/appengine/frontend/rpc_progress.go [modify] https://crrev.com/41b3be13fb2ad3391f9854b31e0fd478127db15c/go/src/infra/tricium/appengine/frontend/gerrit.go
,
Jan 30 2018
The above change didn't quite have the intended effect; the revision string that's added in the Analyze request isn't the same as the revision string that's used when trying to fetch run ID in Progress request. Specifically, the GerritRevision string from track.AnalyzeRequest is actually a SHA1 hash, whereas the Revision in GerritDetails that's provided in ProgressRequest is the git ref string (e.g. refs/changes/56/123456/1). The root of this problem is that the GerritDetails constructed in gerrit/poll.go for AnalyzeRequest uses the SHA1 hash even though the API definition (in tricium.proto) says that GerritDetails.Revision is the git ref string. The term "Revision" is somewhat ambiguous, since there are multiple pieces of information that can be used to identify a specific revision/patchset (e.g. change ID + patchset number; revision hash; revision git ref; etc.) I'm pretty sure that the GitRef in tricium.AnalyzeRequest will be redundant if the git ref string is used to identify the revision, and that's included inside of tricium.GerritDetails already.
,
Jan 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/38bc02077949358d7ad99145e1a1dec968b29eb7 commit 38bc02077949358d7ad99145e1a1dec968b29eb7 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Tue Jan 30 16:57:01 2018 Use the git ref when constructing GerritDetails In the Tricium service, when polling Gerrit, we construct an AnalyzeRequest message which will then be used make an Analyze pRPC request. In tricium.proto it suggests that Revision in GerritDetails is a git ref string, e.g. refs/changes/56/123456/1, whereas currently we're using a revision SHA1 hash. This CL changes the string used to the git ref. This is a follow-up to https://crrev.com/c/890461. Bug: 806532 Change-Id: I85ad8f24ef98dbbf066783f140be4987326ef791 Reviewed-on: https://chromium-review.googlesource.com/892359 Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/38bc02077949358d7ad99145e1a1dec968b29eb7/go/src/infra/tricium/appengine/gerrit/poll.go
,
Jan 30 2018
CL committed, checked with quick testing (https://chromium-review.googlesource.com/c/playground/gerrit-tricium/demo/+/888091).
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/47b35eab2b1c315c04735c129bcad857f22ef280 commit 47b35eab2b1c315c04735c129bcad857f22ef280 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Tue Feb 06 21:37:24 2018 In set review request, use patch set number This is expected to fix tricium sending comments to Gerrit, which stopped working at the last deployment. In https://crrev.com/c/892359, the Revision field in GerritDetails in AnalyzeRequest was changed to be the ref (e.g. refs/changes/78/78/1). But, this revision string is used as revision-id in SetReview requests to the Gerrit REST API. The revision-id used can be a patch set number or commit ID hash, but not a ref string. This CL would change it to be a patch set number, since this can be easily extracted from the ref string. https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-id Bug: 806532 Change-Id: I8984f298773882ea5be9789a263ed960bfeee42d Reviewed-on: https://chromium-review.googlesource.com/903222 Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/47b35eab2b1c315c04735c129bcad857f22ef280/go/src/infra/tricium/appengine/gerrit/gerrit_test.go [modify] https://crrev.com/47b35eab2b1c315c04735c129bcad857f22ef280/go/src/infra/tricium/appengine/gerrit/gerrit.go |
|||
►
Sign in to add a comment |
|||
Comment 1 by qyears...@chromium.org
, Jan 27 2018Labels: Milestone-Progress