Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Issue 3013683002: [pinpoint] Add a mapping from repository URLs to repository names. (Closed)

Created:
3 years, 3 months ago by dtu
Modified:
3 years, 3 months ago
Reviewers:
perezju, shatch, sullivan
CC:
catapult-reviews_chromium.org, perf-dashboard-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

[pinpoint] Add a mapping from repository URLs to repository names. webrtc just changed repository locations, which means that we have two URLs for the same repository, the old one and the new one. If we have an additional mapping from URLs to names, we can have two URL entries that both map to the same short name. So internally, they will both be known as 'webrtc'. Then when looking up the URL later in the name -> URL mapping, it will always be the new URL. Essentially, any old URLs get upconverted automatically. I've chosen to have a separate key with a new name and different structure, because I want to stress that the original 'repositories' key has the "canonical repository information" mapping. In case we add other repository information besides the URL, that's the key to add it to. If a bisect run finds a DEPS file with an unknown repository URL, it will still add it automatically to both mappings, similar to before. But if it will have the same name as another entry, I've chosen to make it fail instead of updating it. This is to avoid situations where we overwrite a repository name that we shouldn't. E.g. `src` maps to `breakpad/src`. If someone adds a dep `other_repo/src`, and we don't want to accidentally overwrite the `src` mapping to point to `other_repo/src`. We should update the mapping manually in cases like this. BUG=catapult:#3861 Review-Url: https://chromiumcodereview.appspot.com/3013683002 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/bbb2b1f8de98ba6bb904e9f68a08d242d521ec04

Patch Set 1 #

Patch Set 2 : Unit tests. #

Total comments: 4

Patch Set 3 : /api/gitiles #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -54 lines) Patch
M dashboard/dashboard/pinpoint/handlers/gitiles.py View 1 2 2 chunks +6 lines, -7 lines 0 comments Download
M dashboard/dashboard/pinpoint/handlers/gitiles_test.py View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M dashboard/dashboard/pinpoint/models/change/change_test.py View 1 chunk +4 lines, -0 lines 0 comments Download
M dashboard/dashboard/pinpoint/models/change/commit.py View 5 chunks +5 lines, -40 lines 0 comments Download
M dashboard/dashboard/pinpoint/models/change/commit_test.py View 1 chunk +3 lines, -0 lines 0 comments Download
A dashboard/dashboard/pinpoint/models/change/repository.py View 1 2 1 chunk +46 lines, -0 lines 1 comment Download
A dashboard/dashboard/pinpoint/models/change/repository_test.py View 1 1 chunk +51 lines, -0 lines 0 comments Download
M dashboard/dashboard/templates/edit_site_config.html View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
dtu
3 years, 3 months ago (2017-09-14 21:49:02 UTC) #2
shatch
https://codereview.chromium.org/3013683002/diff/20001/dashboard/dashboard/pinpoint/models/change/repository.py File dashboard/dashboard/pinpoint/models/change/repository.py (right): https://codereview.chromium.org/3013683002/diff/20001/dashboard/dashboard/pinpoint/models/change/repository.py#newcode1 dashboard/dashboard/pinpoint/models/change/repository.py:1: # Copyright 2016 The Chromium Authors. All rights reserved. ...
3 years, 3 months ago (2017-09-15 01:14:00 UTC) #3
dtu
https://codereview.chromium.org/3013683002/diff/20001/dashboard/dashboard/pinpoint/models/change/repository.py File dashboard/dashboard/pinpoint/models/change/repository.py (right): https://codereview.chromium.org/3013683002/diff/20001/dashboard/dashboard/pinpoint/models/change/repository.py#newcode1 dashboard/dashboard/pinpoint/models/change/repository.py:1: # Copyright 2016 The Chromium Authors. All rights reserved. ...
3 years, 3 months ago (2017-09-15 06:21:44 UTC) #4
shatch
lgtm
3 years, 3 months ago (2017-09-15 11:09:52 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/3013683002/40001
3 years, 3 months ago (2017-09-18 17:01:23 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/bbb2b1f8de98ba6bb904e9f68a08d242d521ec04
3 years, 3 months ago (2017-09-18 17:34:00 UTC) #10
perezju
3 years, 3 months ago (2017-09-19 11:34:31 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/3013683002/diff/40001/dashboard/dashboard/pin...
File dashboard/dashboard/pinpoint/models/change/repository.py (right):

https://codereview.chromium.org/3013683002/diff/40001/dashboard/dashboard/pin...
dashboard/dashboard/pinpoint/models/change/repository.py:12: def
RepositoryUrl(name):
nit: Can you add docstrings to these on a follow up?

Maybe also add some of the explanation you gave on the CL description as
comments here in the code.

Powered by Google App Engine
This is Rietveld 408576698