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

Side by Side Diff: masters/master.chromium.lkgr/lkgr_finder.py

Issue 14031022: initial pass at the steps to use for blink in lkgr_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Fetch the latest results for a pre-selected set of builders we care about. 6 """Fetch the latest results for a pre-selected set of builders we care about.
7 If we find a 'good' revision -- based on criteria explained below -- we 7 If we find a 'good' revision -- based on criteria explained below -- we
8 mark the revision as LKGR, and POST it to the LKGR server: 8 mark the revision as LKGR, and POST it to the LKGR server:
9 9
10 http://chromium-status.appspot.com/lkgr 10 http://chromium-status.appspot.com/lkgr
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 BLINK_REVISIONS_URL = 'https://blink-status.appspot.com' 73 BLINK_REVISIONS_URL = 'https://blink-status.appspot.com'
74 CHROMIUM_REVISIONS_URL = 'https://chromium-status.appspot.com' 74 CHROMIUM_REVISIONS_URL = 'https://chromium-status.appspot.com'
75 REVISIONS_PASSWORD_FILE = '.status_password' 75 REVISIONS_PASSWORD_FILE = '.status_password'
76 MASTER_TO_BASE_URL = { 76 MASTER_TO_BASE_URL = {
77 'chromium': 'http://build.chromium.org/p/chromium', 77 'chromium': 'http://build.chromium.org/p/chromium',
78 'chromium.chrome': 'http://build.chromium.org/p/chromium.chrome', 78 'chromium.chrome': 'http://build.chromium.org/p/chromium.chrome',
79 'chromium.linux': 'http://build.chromium.org/p/chromium.linux', 79 'chromium.linux': 'http://build.chromium.org/p/chromium.linux',
80 'chromium.mac': 'http://build.chromium.org/p/chromium.mac', 80 'chromium.mac': 'http://build.chromium.org/p/chromium.mac',
81 'chromium.win': 'http://build.chromium.org/p/chromium.win', 81 'chromium.win': 'http://build.chromium.org/p/chromium.win',
82 'chromium.webkit': 'http://build.chromium.org/p/chromium.webkit',
82 } 83 }
83 84
84 # *_LKGR_STEPS controls which steps must pass for a revision to be marked 85 # *_LKGR_STEPS controls which steps must pass for a revision to be marked
85 # as LKGR. 86 # as LKGR.
86 #------------------------------------------------------------------------------- 87 #-------------------------------------------------------------------------------
87 88
88 CHROMIUM_LKGR_STEPS = { 89 CHROMIUM_LKGR_STEPS = {
89 'chromium.win': { 90 'chromium.win': {
90 'Win Builder (dbg)': [ 91 'Win Builder (dbg)': [
91 'compile', 92 'compile',
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 'slave_steps', 288 'slave_steps',
288 ], 289 ],
289 }, # chromium.linux 290 }, # chromium.linux
290 'chromium.chrome': { 291 'chromium.chrome': {
291 'Google Chrome Linux x64': [ # cycle time is ~14 mins as of 5/5/2012 292 'Google Chrome Linux x64': [ # cycle time is ~14 mins as of 5/5/2012
292 'compile', 293 'compile',
293 ], 294 ],
294 }, # chromium.chrome 295 }, # chromium.chrome
295 } 296 }
296 297
298 # For blink, for the moment, we only want to test bots that also exist
299 # in upstream variants. This helps us ensure that we won't pull a Chromium
300 # rev that is broken. The newest Chromium rev that isn't broken should also
301 # likely contain the newest revision of Blink that has been rolled downstream.
302 # This is still likely behind Blink HEAD by quite a bit, but at least is
303 # better than the Chromium LKGR.
304
305 BLINK_LKGR_STEPS = {
306 'chromium.linux': {
307 'Linux Builder (dbg)': ['compile'],
308 'Linux Builder (dbg)(32)': ['compile'],
309 'Linux Aura': ['compile'],
310 'Android Builder (dbg)': ['slave_steps'],
311 'Android Builder': ['slave_steps'],
312 },
313 'chromium.mac': {
314 'Mac Builder (dbg)': ['compile'],
315 },
316 'chromium.win': {
317 'Win Builder (dbg)': ['compile'],
318 'Win Aura Builder': ['compile'],
319 },
320 'chromium.webkit': {
321 'WebKit Win Builder (deps)': ['compile'],
322 'WebKit Mac Builder (deps)': ['compile'],
323 'WebKit Linux (deps)': ['compile'],
324 },
325 }
326
297 #------------------------------------------------------------------------------- 327 #-------------------------------------------------------------------------------
298 328
299 def SendMail(sender, recipients, subject, message): 329 def SendMail(sender, recipients, subject, message):
300 if not EMAIL_ENABLED: 330 if not EMAIL_ENABLED:
301 return 331 return
302 try: 332 try:
303 body = ['From: %s' % sender] 333 body = ['From: %s' % sender]
304 body.append('To: %s' % recipients) 334 body.append('To: %s' % recipients)
305 body.append('Subject: %s' % subject) 335 body.append('Subject: %s' % subject)
306 # Default to sending replies to the recipient list, not the account running 336 # Default to sending replies to the recipient list, not the account running
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 opt_parser.add_option('--allowed-lag', type='int', default=2, 835 opt_parser.add_option('--allowed-lag', type='int', default=2,
806 help='How long (in hours) since an LKGR update before' 836 help='How long (in hours) since an LKGR update before'
807 'it\'s considered out-of-date. This is a minimum and ' 837 'it\'s considered out-of-date. This is a minimum and '
808 'will be increased when commit activity slows.') 838 'will be increased when commit activity slows.')
809 opt_parser.add_option('--html', metavar='FILE', 839 opt_parser.add_option('--html', metavar='FILE',
810 help='Output details in HTML format ' 840 help='Output details in HTML format '
811 '(for troubleshooting LKGR staleness issues).') 841 '(for troubleshooting LKGR staleness issues).')
812 opt_parser.add_option('--text', action='store_true', 842 opt_parser.add_option('--text', action='store_true',
813 help='Output details in plain text format ' 843 help='Output details in plain text format '
814 '(for troubleshooting LKGR staleness issues).') 844 '(for troubleshooting LKGR staleness issues).')
845 opt_parser.add_option('-b', '--blink', action='store_true',
846 help='Find the Blink LKGR rather than the Chromium '
847 'one.')
815 options, args = opt_parser.parse_args() 848 options, args = opt_parser.parse_args()
816 849
817 # Error notification setup. 850 # Error notification setup.
818 fqdn = socket.getfqdn() 851 fqdn = socket.getfqdn()
819 sender = '%s@%s' % (os.environ.get('LOGNAME', 'unknown'), fqdn) 852 sender = '%s@%s' % (os.environ.get('LOGNAME', 'unknown'), fqdn)
820 recipients = 'chrome-troopers+alerts@google.com' 853 recipients = 'chrome-troopers+alerts@google.com'
821 subject_base = os.path.basename(__file__) + ': ' 854 subject_base = os.path.basename(__file__) + ': '
822 855
823 global EMAIL_ENABLED 856 global EMAIL_ENABLED
824 EMAIL_ENABLED = options.email_errors 857 EMAIL_ENABLED = options.email_errors
825 858
826 if args: 859 if args:
827 opt_parser.print_usage() 860 opt_parser.print_usage()
828 SendMail(sender, recipients, subject_base + 'Usage error', 861 SendMail(sender, recipients, subject_base + 'Usage error',
829 ' '.join(sys.argv) + '\n' + opt_parser.get_usage()) 862 ' '.join(sys.argv) + '\n' + opt_parser.get_usage())
830 return 1 863 return 1
831 864
832 global VERBOSE 865 global VERBOSE
833 VERBOSE = not options.quiet 866 VERBOSE = not options.quiet
834 867
835 lkgr_type = 'Chromium' 868 if options.blink:
836 revisions_url = CHROMIUM_REVISIONS_URL 869 lkgr_type = 'Blink'
837 lkgr_steps = CHROMIUM_LKGR_STEPS 870 revisions_url = BLINK_REVISIONS_URL
871 lkgr_steps = BLINK_LKGR_STEPS
872 else:
873 lkgr_type = 'Chromium'
874 revisions_url = CHROMIUM_REVISIONS_URL
875 lkgr_steps = CHROMIUM_LKGR_STEPS
838 876
839 if options.manual: 877 if options.manual:
840 PostLKGR(revisions_url, options.manual, options.pwfile, options.dry) 878 PostLKGR(revisions_url, options.manual, options.pwfile, options.dry)
841 for master in options.notify: 879 for master in options.notify:
842 NotifyMaster(master, options.manual, options.dry) 880 NotifyMaster(master, options.manual, options.dry)
843 return 0 881 return 0
844 882
845 lkgr = FetchLKGR(revisions_url) 883 lkgr = FetchLKGR(revisions_url)
846 if lkgr is None: 884 if lkgr is None:
847 SendMail(sender, recipients, subject_base + 'Failed to fetch %s LKGR' % 885 SendMail(sender, recipients, subject_base + 'Failed to fetch %s LKGR' %
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 SendMail(sender, recipients, '%s%s LKGR (%s) exceeds lag threshold' % 946 SendMail(sender, recipients, '%s%s LKGR (%s) exceeds lag threshold' %
909 (subject_base, lkgr_type, lkgr), '\n'.join(run_log)) 947 (subject_base, lkgr_type, lkgr), '\n'.join(run_log))
910 return 1 948 return 1
911 949
912 VerbosePrint('-' * 80) 950 VerbosePrint('-' * 80)
913 951
914 return 0 952 return 0
915 953
916 if __name__ == '__main__': 954 if __name__ == '__main__':
917 sys.exit(main()) 955 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698