Commit 757f2079 authored by Nodir Turakulov's avatar Nodir Turakulov Committed by Commit Bot

Reland: add "generic" infra path config

It proved to be dangerous to introduce conditional logic into recipes
and recipe modules to alternate between buildbot and luci modes, namely
it touches buildbot code paths, which can be very dangerous.

Instead, introduce "generic" path config that configures
existing base paths from the built-in ones.

Also remove swarmbucket path config because it is not used.

--

This CL is a simpler version of
https://chromium-review.googlesource.com/c/459234/
in that it does not make generic path config a default.
This avoids behavioral change in downstream recipe packages and
makes rolling into build.git trivial.

R=iannucci@chromium.org
BUG=660481

Change-Id: Ifc147e29e68a6e0c800da73a8e356238dfc2938a
Reviewed-on: https://chromium-review.googlesource.com/461359
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
parent f7023e7c
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[CACHE]/git@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'start_dir': ('/', 'b', 'FakeTestingCWD'), 'cache': ('/', 'b', 'c'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -3,8 +3,7 @@
"cmd": [],
"name": "show cache path",
"~followup_annotations": [
"@@@STEP_LOG_LINE@result@[CACHE]@@@",
"@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@",
"@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@",
"@@@STEP_LOG_END@result@@@"
]
},
......
......@@ -16,8 +16,7 @@ DEPS = [
def RunSteps(api):
api.step('show cache path', [])
api.step.active_result.presentation.logs['result'] = [
str(api.path['cache']),
str(api.infra_paths.default_git_cache_dir),
'base_paths: %r' % (api.path.c.base_paths,),
]
......@@ -25,7 +24,7 @@ def GenTests(api):
yield api.test('basic')
for platform in ('linux', 'mac', 'win'):
for path_config in ('buildbot', 'kitchen', 'swarmbucket'):
for path_config in ('buildbot', 'kitchen', 'generic'):
yield (
api.test('paths_%s_%s' % (path_config, platform)) +
api.platform.name(platform) +
......
......@@ -51,6 +51,8 @@ def infra_kitchen(c):
c.base_paths[path] = c.base_paths['cache'] + (path,)
@CONFIG_CTX(includes=['infra_buildbot'])
def infra_swarmbucket(c):
c.base_paths['git_cache'] = c.START_DIR + ('git_cache',)
@CONFIG_CTX()
def infra_generic(c):
c.base_paths['builder_cache'] = c.base_paths['cache'] + ('builder',)
c.base_paths['git_cache'] = c.base_paths['cache'] + ('git',)
c.base_paths['goma_cache'] = c.base_paths['cache'] + ('goma',)
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