Skip to content
Permalink
Browse files

Auto merge of #25351 - servo:try-without-merge, r=<try>

[Do not merge] Run try on multiple past commits without merging them to current master
  • Loading branch information
bors-servo committed Jan 14, 2020
2 parents b52ddc5 + 7bf1a5d commit a59a85c7e5e1a391fcf792a422394152a35ff441
Showing with 31 additions and 18 deletions.
  1. +1 −2 .taskcluster.yml
  2. +22 −10 etc/taskcluster/decision_task.py
  3. +8 −6 etc/taskcluster/decisionlib.py
@@ -45,9 +45,8 @@ tasks:
- '-e'
- '-c'
- >-
git init repo &&
git clone "$GIT_URL" repo &&
cd repo &&
git fetch --depth 1 "$GIT_URL" "$GIT_REF" &&
git reset --hard "$GIT_SHA" &&
python3 etc/taskcluster/decision_task.py
in:
@@ -10,7 +10,18 @@


def main(task_for):
with decisionlib.make_repo_bundle():
decisionlib.Task.with_repo_bundle = lambda s, *args, **kwargs: s.with_repo(*args, *kwargs)
commits = [
"dcdf910a259005bbdd993089d12f9f7eca9a26db",
"de610e4d755005376bbd9a4468e24e6c576a3f47",
]
CONFIG.initial_git_sha = CONFIG.git_sha
# with decisionlib.make_repo_bundle():
for CONFIG.git_sha in commits:
CONFIG.task_name_template = "Servo {}: %s".format(CONFIG.git_sha)
CONFIG.scopes_for_all_subtasks
if hasattr(CONFIG, "_task_id"):
del CONFIG._task_id
tasks(task_for)


@@ -23,7 +34,7 @@ def tasks(task_for):

# Work around a tc-github bug/limitation:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1548781#c4
if task_for.startswith("github"):
if task_for.startswith("github") and "statuses" not in CONFIG.routes_for_all_subtasks:
# https://github.com/taskcluster/taskcluster/blob/21f257dc8/services/github/config.yml#L14
CONFIG.routes_for_all_subtasks.append("statuses")

@@ -95,7 +106,7 @@ def tasks(task_for):
# https://github.com/servo/servo/pull/22597#issuecomment-451518810
CONFIG.git_sha_is_current_head()

linux_tidy_unit_untrusted()
# linux_tidy_unit_untrusted()

elif task_for == "try-windows-ami":
CONFIG.git_sha_is_current_head()
@@ -670,7 +681,7 @@ def macos_run_task(name):


def linux_wpt():
linux_wpt_common(total_chunks=4, layout_2020=False)
linux_wpt_common(total_chunks=10, layout_2020=False)


def linux_wpt_layout_2020():
@@ -787,12 +798,13 @@ def wpt_chunks(platform, make_chunk_task, build_task, total_chunks, processes,
for word in script.split()
if word.endswith(".log")
])
task.find_or_create("%s_%swpt_%s.%s" % (
platform.replace(" ", "_").lower(),
job_id_prefix.replace("-", "_"),
this_chunk,
CONFIG.task_id(),
))
task.create()
# task.find_or_create("%s_%swpt_%s.%s" % (
# platform.replace(" ", "_").lower(),
# job_id_prefix.replace("-", "_"),
# this_chunk,
# CONFIG.task_id(),
# ))


def daily_tasks_setup():
@@ -71,7 +71,7 @@ def task_id(self):
# the merge parents rather that the actual sha of the merge commit. This ensures that tasks
# can be reused if the tree is in an identical state. Otherwise, if the head commit is
# not a merge, we can rely on the head commit sha for that purpose.
raw_commit = subprocess.check_output(["git", "cat-file", "commit", "HEAD"])
raw_commit = subprocess.check_output(["git", "cat-file", "commit", CONFIG.git_sha])
parent_commits = [
value.decode("utf8")
for line in raw_commit.split(b"\n")
@@ -198,7 +198,7 @@ def with_treeherder(self, category, symbol, group_name=None, group_symbol=None):

if CONFIG.treeherder_repository_name:
assert CONFIG.git_sha
suffix = ".v2._/%s.%s" % (CONFIG.treeherder_repository_name, CONFIG.git_sha)
suffix = ".v2._/%s.%s" % (CONFIG.treeherder_repository_name, CONFIG.initial_git_sha)
self.with_routes(
"tc-treeherder" + suffix,
"tc-treeherder-staging" + suffix,
@@ -515,11 +515,12 @@ def with_repo(self, sparse_checkout=None):
type .git\\info\\sparse-checkout
"""
git += """
git fetch --no-tags {} {}
git remote add origin {}
git fetch origin
git reset --hard {}
""".format(
assert_truthy(self.git_fetch_url),
assert_truthy(self.git_fetch_ref),
#assert_truthy(self.git_fetch_ref),
assert_truthy(self.git_checkout_sha),
)
return self \
@@ -651,11 +652,12 @@ def with_repo(self, alternate_object_dir=""):
git init repo
cd repo
echo "{alternate}" > .git/objects/info/alternates
time git fetch --no-tags {} {}
git remote add origin {}
time git fetch origin
time git reset --hard {}
""".format(
assert_truthy(self.git_fetch_url),
assert_truthy(self.git_fetch_ref),
#assert_truthy(self.git_fetch_ref),
assert_truthy(self.git_checkout_sha),
alternate=alternate_object_dir,
))

0 comments on commit a59a85c

Please sign in to comment.
You can’t perform that action at this time.