Commit f3b2123a authored by ilevy@chromium.org's avatar ilevy@chromium.org

Disable jobs sent directly to triggered bots

- and display a warning message

BUG=146713


Review URL: https://chromiumcodereview.appspot.com/10956062

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158377 0039d316-1c4b-4281-b951-d872f2087c98
parent e1a0376a
......@@ -1591,6 +1591,14 @@ def CMDtry(parser, args):
(b, forced_tests) for b, t in builders_and_tests.iteritems()
if t != ['compile'])
if any('triggered' in b for b in builders_and_tests):
print >> sys.stderr, (
'ERROR You are trying to send a job to a triggered bot. This type of'
' bot requires an\ninitial job from a parent (usually a builder). '
'Instead send your job to the parent.\n'
'Bot list: %s' % builders_and_tests)
return 1
patchset = cl.GetPatchset()
if not cl.GetPatchset():
patchset = cl.GetMostRecentPatchset(cl.GetIssue())
......
......@@ -836,6 +836,13 @@ def TryChange(argv,
# If no bot is specified, either the default pool will be selected or the
# try server will refuse the job. Either case we don't need to interfere.
if any('triggered' in b.split(':', 1)[0] for b in options.bot):
print >> sys.stderr, (
'ERROR You are trying to send a job to a triggered bot. This type of'
' bot requires an\ninitial job from a parent (usually a builder). '
'Instead send your job to the parent.\nBot list: %s' % options.bot)
return 1
if options.print_bots:
print 'Bots which would be used:'
for bot in options.bot:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment