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

Side by Side Diff: recipes/recipe_modules/recipe_autoroller/api.py

Issue 2233773002: recipe_autoroller: pass --rietveld to git cl set-commit to match upload (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | recipes/recipes/recipe_autoroller.expected/previously_uploaded_match.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import hashlib 5 import hashlib
6 import json 6 import json
7 import re 7 import re
8 8
9 from recipe_engine import recipe_api 9 from recipe_engine import recipe_api
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 change_data = json.loads(cat_result.stdout) 231 change_data = json.loads(cat_result.stdout)
232 cat_result.presentation.links['Issue %s' % change_data['issue']] = ( 232 cat_result.presentation.links['Issue %s' % change_data['issue']] = (
233 change_data['issue_url']) 233 change_data['issue_url'])
234 self.m.git('cl', 'issue', change_data['issue'], cwd=workdir) 234 self.m.git('cl', 'issue', change_data['issue'], cwd=workdir)
235 if change_data['diff_digest'] != diff_digest: 235 if change_data['diff_digest'] != diff_digest:
236 need_to_upload = True 236 need_to_upload = True
237 rebase = True 237 rebase = True
238 elif roll_result['trivial']: 238 elif roll_result['trivial']:
239 # We won't be uploading. Make sure trivial rolls don't get stuck 239 # We won't be uploading. Make sure trivial rolls don't get stuck
240 # if previous CQ attempt failed because of flake. 240 # if previous CQ attempt failed because of flake.
241 self.m.git('cl', 'set-commit', cwd=workdir) 241 # Pass --rietveld flag to match upload args below.
242 self.m.git('cl', 'set-commit', '--rietveld', cwd=workdir)
242 243
243 if need_to_upload: 244 if need_to_upload:
244 commit_message = ( 245 commit_message = (
245 'Rebase' if rebase else get_commit_message(roll_result)) 246 'Rebase' if rebase else get_commit_message(roll_result))
246 if roll_result['trivial']: 247 if roll_result['trivial']:
247 # Land immediately. 248 # Land immediately.
248 upload_args = ['--use-commit-queue'] 249 upload_args = ['--use-commit-queue']
249 if not rebase: 250 if not rebase:
250 commit_message += '\nTBR=%s\n' % ','.join(TRIVIAL_ROLL_TBR_EMAILS) 251 commit_message += '\nTBR=%s\n' % ','.join(TRIVIAL_ROLL_TBR_EMAILS)
251 else: 252 else:
(...skipping 23 matching lines...) Expand all
275 'issue': m.group(1), 276 'issue': m.group(1),
276 'issue_url': m.group(2), 277 'issue_url': m.group(2),
277 'diff_digest': diff_digest, 278 'diff_digest': diff_digest,
278 } 279 }
279 issue_result.presentation.links['Issue %s' % change_data['issue']] = ( 280 issue_result.presentation.links['Issue %s' % change_data['issue']] = (
280 change_data['issue_url']) 281 change_data['issue_url'])
281 self.m.gsutil.upload( 282 self.m.gsutil.upload(
282 self.m.json.input(change_data), 283 self.m.json.input(change_data),
283 'recipe-roller-cl-uploads', 284 'recipe-roller-cl-uploads',
284 cfg_digest) 285 cfg_digest)
OLDNEW
« no previous file with comments | « no previous file | recipes/recipes/recipe_autoroller.expected/previously_uploaded_match.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698