Update ChangeID used in Gerrit SetReview |
|||
Issue descriptionThis is needed to make sure a change is uniquely identified. Tricium currently uses a simplified URL with just a legacy change ID but it should instead incorporate the project and master. See https://dev.vaadin.com/review/Documentation/rest-api-changes.html#change-id for details.
,
Aug 31 2017
Investigate if the current change ID info stored could just be fully qualified with the project name. This is something that could happen in the poller.
,
Aug 31 2017
Reading through the code in general to get more background now... Notes from email: - The URL mangling happens in setReview in gerrit.go: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/gerrit.go Now, this just uses whatever change string is passed in. As long as GerritChange is always a fully-qualified change ID in all AnalyzeRequests, then the URL will use fully-qualified change IDs... - Requests are tracked in AnalyzeRequest entities: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/common/track/track.go Note that track.AnalyzeRequest (datastore entity) is different from tricium.AnalyzeRequest (protobuf). Both have a string field called GerritChange, and for consistency it would be nice if these were always fully-qualified change IDs. - The Gerrit poller enqueues analyze requests and sets the project to the Gerrit project of a change: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/poll.go It is here that tricium.AnalyzeRequest messages are made based on Gerrit ChangeInfo. https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/poll.go?l=317 - This is also relevant: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/frontend/rpc_analyze.go It is here that track.AnalyzeRequest entities are created based on tricium.AnalyzeRequest messages? One thing that's clear here is that the term "change ID" is ambiguous -- it could either mean a fully-qualified Gerrit change ID (project~branch~Change-Id), or just a "Change-Id" footer value ("I" + sha1 hash, unique only within a given project and branch). So we'll have to be really explicit to make it clear what is meant...
,
Sep 1 2017
Yes, let's make this clearer in the documentation and make sure it is propagated properly in the code. The change ID is currently taken from the response the poller gets.
,
Sep 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/57076cbe93f4303e2212fda5b678b7f168818380 commit 57076cbe93f4303e2212fda5b678b7f168818380 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Thu Sep 07 16:55:09 2017 Put fully-qualified change ID in request and add validation Bug: 750090 Change-Id: I17e97e23ecf2890bf6b72ffd1d7a3167ed1b0a11 Reviewed-on: https://chromium-review.googlesource.com/649953 Reviewed-by: Emma Söderberg <emso@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/57076cbe93f4303e2212fda5b678b7f168818380/go/src/infra/tricium/appengine/frontend/rpc_analyze_test.go [modify] https://crrev.com/57076cbe93f4303e2212fda5b678b7f168818380/go/src/infra/tricium/appengine/gerrit/poll.go [modify] https://crrev.com/57076cbe93f4303e2212fda5b678b7f168818380/go/src/infra/tricium/appengine/frontend/rpc_analyze.go
,
Sep 11 2017
There is another related update that I wanted to make here: For the Change datastore entity, the datastore ID is still gotten from gr.ChangeInfo.ChangeID, which may not be the fully-qualified change ID used in AnalyzeRequest. For consistency I'd like to change that entitiy to use fully-qualified change IDs too: https://cs.chromium.org/chromium/infra/go/src/infra/tricium/appengine/gerrit/poll.go
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/c1038579798db0616518eeaa0ab6008e325e73d0 commit c1038579798db0616518eeaa0ab6008e325e73d0 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Wed Oct 11 15:31:51 2017 In Change datastore entities, use fully qualified change IDs Bug: 750090 Change-Id: Ife41d58ec9e90a862c3733a77c2e00903f982aab Reviewed-on: https://chromium-review.googlesource.com/710497 Reviewed-by: Emma Söderberg <emso@chromium.org> Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> [modify] https://crrev.com/c1038579798db0616518eeaa0ab6008e325e73d0/go/src/infra/tricium/appengine/gerrit/poll.go [modify] https://crrev.com/c1038579798db0616518eeaa0ab6008e325e73d0/go/src/infra/tricium/appengine/gerrit/poll_test.go
,
Oct 11 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by emso@chromium.org
, Aug 28 2017