Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Backout 0b68a3d395b3 from bug 846104, because of Bug 975191 - Self se…
Browse files Browse the repository at this point in the history
…rve API for oak not building Oak nightly builds even know there is a nightly from 2 days ago
  • Loading branch information
nthomas-mozilla committed Mar 5, 2014
1 parent 6db7e9e commit a36c93c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions buildapi/scripts/selfserve-agent.py
Expand Up @@ -449,27 +449,24 @@ def do_new_build_at_revision(self, message_data, message):
subprocess.check_call(cmd)
return {"errors": False, "msg": "Ok"}

def _create_build_for_revision(self, who, branch, revision, priority, builder_expressions, builder_exclusions=None):
def _create_build_for_revision(self, who, branch, revision, priority, builder_expression, builder_exclusions=None):
if builder_exclusions is None:
builder_exclusions = ['%l10n nightly']
now = time.time()
repo_path = self._get_repo_path(branch)

# Find builders that have been active in the past 2 weeks
q = """SELECT DISTINCT buildername FROM buildrequests WHERE
buildername LIKE :buildername AND
"""
for i, bx in enumerate(builder_expressions):
q = q + "buildername LIKE :buildername_expression_%i AND " % i

for i, bx in enumerate(builder_exclusions):
q = q + "buildername NOT LIKE :buildername_exclusion_%i AND " % i
q = q + """
submitted_at > :submitted_at"""
qparams = {
'buildername': builder_expression,
'submitted_at': time.time() - 14 * 24 * 3600,
}
for i, bx in enumerate(builder_expressions):
qparams['buildername_expression_%i' % i] = builder_expressions[i]
for i, bx in enumerate(builder_exclusions):
qparams['buildername_exclusion_%i' % i] = builder_exclusions[i]
result = self.db.execute(text(q), qparams)
Expand Down Expand Up @@ -539,7 +536,7 @@ def do_new_pgobuild_at_revision(self, message_data, message):
branch,
revision,
priority,
["%% %s pgo-build" % branch])
"%% %s pgo-build" % branch)

def do_new_nightly_at_revision(self, message_data, message):
who = message_data['who']
Expand All @@ -552,7 +549,7 @@ def do_new_nightly_at_revision(self, message_data, message):
branch,
revision,
priority,
['%\_' + branch + '\_%nightly', '% ' + branch + ' %nightly%'],
'%' + branch + '%nightly',
['%' + branch + '_v%nightly', '%l10n nightly'])

def do_cancel_revision(self, message_data, message):
Expand Down

0 comments on commit a36c93c

Please sign in to comment.