Pass release_candidate branch to gclient for releases. This is to allow gclient to filter out dependencies available only on main channels during release candidate builds. Bug: https://github.com/flutter/flutter/issues/113931 Change-Id: I175e07a7c426709933954990dc9b41cbccd4c110 Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/35080 Reviewed-by: Zach Anderson <zra@google.com> Commit-Queue: Godofredo Contreras <godofredoc@google.com> (cherry picked from commit 4b551065de493f9d4fa73df21e2d558e7470f878) Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/35302 Reviewed-by: Casey Hillers <chillers@google.com>
diff --git a/recipe_modules/repo_util/api.py b/recipe_modules/repo_util/api.py index 858d3bb..6aad800 100644 --- a/recipe_modules/repo_util/api.py +++ b/recipe_modules/repo_util/api.py
@@ -24,6 +24,7 @@ 'openpay': 'main', } +import copy import re from recipe_engine import recipe_api @@ -42,6 +43,13 @@ clobber(bool): A boolean indicating whether the checkout folder should be cleaned. custom_vars(dict): A dictionary with custom variable definitions for gclient solution. """ + # Pass a special gclient variable to identify release candidate branch checkouts. This + # is required to prevent trying to download experimental dependencies on release candidate + # branches. + local_custom_vars = copy.deepcopy(custom_vars) + if (self.m.properties.get('git_branch', '').startswith('flutter-') or + self.m.properties.get('git_branch', '') in ['beta', 'stable']): + local_custom_vars['release_candidate'] = True git_url = REPOS['engine'] git_id = self.m.buildbucket.gitiles_commit.id git_ref = self.m.buildbucket.gitiles_commit.ref @@ -77,7 +85,7 @@ soln.url = git_url soln.revision = git_id soln.managed = False - soln.custom_vars = custom_vars + soln.custom_vars = local_custom_vars src_cfg.parent_got_revision_mapping['parent_got_revision' ] = 'got_revision' src_cfg.repo_path_map[git_url] = ( @@ -118,6 +126,13 @@ clobber(bool): A boolean indicating whether the checkout folder should be cleaned. custom_vars(dict): A dictionary with custom variable definitions for gclient solution. """ + # Pass a special gclient variable to identify release candidate branch checkouts. This + # is required to prevent trying to download experimental dependencies on release candidate + # branches. + local_custom_vars = copy.deepcopy(custom_vars) + if (self.m.properties.get('git_branch', '').startswith('flutter-') or + self.m.properties.get('git_branch', '') in ['beta', 'stable']): + local_custom_vars['release_candidate'] = True git_url = REPOS['monorepo'] git_id = self.m.buildbucket.gitiles_commit.id git_ref = self.m.buildbucket.gitiles_commit.ref @@ -154,7 +169,7 @@ soln.url = git_url soln.revision = git_id soln.managed = False - soln.custom_vars = custom_vars + soln.custom_vars = local_custom_vars #src_cfg.parent_got_revision_mapping['parent_got_revision' #] = 'got_revision' src_cfg.repo_path_map[git_url] = ('monorepo', git_ref)
diff --git a/recipe_modules/repo_util/examples/full.expected/basic.json b/recipe_modules/repo_util/examples/full.expected/basic.json index 51af679..277662b 100644 --- a/recipe_modules/repo_util/examples/full.expected/basic.json +++ b/recipe_modules/repo_util/examples/full.expected/basic.json
@@ -774,7 +774,7 @@ "-u", "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", "--spec-path", - "cache_dir = '[CACHE]/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'src/flutter', 'url': 'https://flutter.googlesource.com/mirrors/engine'}]", + "cache_dir = '[CACHE]/git'\nsolutions = [{'custom_vars': {'release_candidate': True}, 'deps_file': '.DEPS.git', 'managed': False, 'name': 'src/flutter', 'url': 'https://flutter.googlesource.com/mirrors/engine'}]", "--revision_mapping_file", "{\"got_engine_revision\": \"src/flutter\"}", "--git-cache-dir",
diff --git a/recipe_modules/repo_util/examples/full.expected/monorepo_release.json b/recipe_modules/repo_util/examples/full.expected/monorepo_release.json new file mode 100644 index 0000000..342e240 --- /dev/null +++ b/recipe_modules/repo_util/examples/full.expected/monorepo_release.json
@@ -0,0 +1,1555 @@ +[ + { + "cmd": [], + "name": "Identify branches" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches.git rev-parse", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "branch", + "-a", + "--contains", + "" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches.git branch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout flutter/flutter" + }, + { + "cmd": [ + "python3", + "-u", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[START_DIR]/flutter", + "--url", + "https://flutter.googlesource.com/mirrors/flutter" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.git setup", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "fetch", + "origin", + "master", + "--recurse-submodules", + "--progress", + "--tags" + ], + "cwd": "[START_DIR]/flutter", + "env": { + "PATH": "RECIPE_REPO[depot_tools]:<PATH>" + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.git fetch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.git checkout", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.read revision", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.git clean", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.submodule sync", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter.submodule update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout flutter/engine" + }, + { + "cmd": [ + "python3", + "-u", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[START_DIR]/engine", + "--url", + "https://flutter.googlesource.com/mirrors/engine" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.git setup", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "fetch", + "origin", + "main", + "--recurse-submodules", + "--progress", + "--tags" + ], + "cwd": "[START_DIR]/engine", + "env": { + "PATH": "RECIPE_REPO[depot_tools]:<PATH>" + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.git fetch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[START_DIR]/engine", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.git checkout", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/engine", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.read revision", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[START_DIR]/engine", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.git clean", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[START_DIR]/engine", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.submodule sync", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[START_DIR]/engine", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/engine.submodule update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout flutter/cocoon" + }, + { + "cmd": [ + "python3", + "-u", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[START_DIR]/cocoon", + "--url", + "https://flutter.googlesource.com/mirrors/cocoon" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.git setup", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "fetch", + "origin", + "main", + "--recurse-submodules", + "--progress", + "--tags" + ], + "cwd": "[START_DIR]/cocoon", + "env": { + "PATH": "RECIPE_REPO[depot_tools]:<PATH>" + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.git fetch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[START_DIR]/cocoon", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.git checkout", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/cocoon", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.read revision", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[START_DIR]/cocoon", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.git clean", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[START_DIR]/cocoon", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.submodule sync", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[START_DIR]/cocoon", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/cocoon.submodule update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout flutter/packages" + }, + { + "cmd": [ + "python3", + "-u", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[START_DIR]/packages", + "--url", + "https://flutter.googlesource.com/mirrors/packages" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.git setup", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "fetch", + "origin", + "main", + "--recurse-submodules", + "--progress", + "--tags" + ], + "cwd": "[START_DIR]/packages", + "env": { + "PATH": "RECIPE_REPO[depot_tools]:<PATH>" + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.git fetch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "FETCH_HEAD" + ], + "cwd": "[START_DIR]/packages", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.git checkout", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/packages", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.read revision", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[START_DIR]/packages", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.git clean", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[START_DIR]/packages", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.submodule sync", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[START_DIR]/packages", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/packages.submodule update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout flutter/flutter (2)" + }, + { + "cmd": [ + "python3", + "-u", + "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", + "--path", + "[START_DIR]/flutter", + "--url", + "https://flutter.googlesource.com/mirrors/flutter" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).git setup", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "fetch", + "origin", + "--recurse-submodules", + "--progress", + "--tags" + ], + "cwd": "[START_DIR]/flutter", + "env": { + "PATH": "RECIPE_REPO[depot_tools]:<PATH>" + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).git fetch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "checkout", + "-f", + "2d72510e447ab60a9728aeea2362d8be2cbd7789" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).git checkout", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).read revision", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" + ] + }, + { + "cmd": [ + "git", + "clean", + "-f", + "-d", + "-x" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).git clean", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "sync" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).submodule sync", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "submodule", + "update", + "--init", + "--recursive" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout flutter/flutter (2).submodule update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Identify branches (2)" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (2).git rev-parse", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "branch", + "-a", + "--contains", + "" + ], + "cwd": "[START_DIR]/flutter/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (2).git branch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Identify branches (3)" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (3).git rev-parse", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "branch", + "-a", + "--contains", + "" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (3).git branch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "git rev-parse" + }, + { + "cmd": [], + "name": "Identify branches (4)" + }, + { + "cmd": [ + "git", + "rev-parse", + "HEAD" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (4).git rev-parse", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "git", + "branch", + "-a", + "--contains", + "" + ], + "cwd": "[START_DIR]/flutter", + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Identify branches (4).git branch", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [], + "name": "Checkout source code" + }, + { + "cmd": [ + "cipd", + "ensure", + "-root", + "RECIPE_REPO[depot_tools]/.cipd_bin", + "-ensure-file", + "RECIPE_REPO[depot_tools]/cipd_manifest.txt", + "-max-threads", + "0", + "-json-output", + "/path/to/tmp/json" + ], + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.ensure depot_tools/.cipd_bin", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"result\": {}@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmcontents", + "[START_DIR]" + ], + "env_suffixes": { + "DEPOT_TOOLS_UPDATE": [ + "0" + ], + "PATH": [ + "RECIPE_REPO[depot_tools]" + ] + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.Clobber cache", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmtree", + "[CACHE]/git" + ], + "env_suffixes": { + "DEPOT_TOOLS_UPDATE": [ + "0" + ], + "PATH": [ + "RECIPE_REPO[depot_tools]" + ] + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.Clobber git cache", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "[START_DIR]" + ], + "env_suffixes": { + "DEPOT_TOOLS_UPDATE": [ + "0" + ], + "PATH": [ + "RECIPE_REPO[depot_tools]" + ] + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.Ensure checkout cache", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py", + "--spec-path", + "cache_dir = '[CACHE]/git'\nsolutions = [{'custom_vars': {'release_candidate': True}, 'deps_file': '.DEPS.git', 'managed': False, 'name': 'monorepo', 'url': 'https://dart.googlesource.com/monorepo'}]", + "--revision_mapping_file", + "{\"got_buildroot_revision\": \"engine/src\", \"got_dart_revision\": \"engine/src/third_party/dart\", \"got_engine_revision\": \"engine/src/flutter\", \"got_flutter_revision\": \"flutter\", \"got_monorepo_revision\": \"monorepo\"}", + "--git-cache-dir", + "[CACHE]/git", + "--cleanup-dir", + "[CLEANUP]/bot_update", + "--output_json", + "/path/to/tmp/json", + "--revision", + "monorepo@2d72510e447ab60a9728aeea2362d8be2cbd7789", + "--refs", + "refs/heads/beta" + ], + "env": { + "DEPOT_TOOLS_REPORT_BUILD": "project/ci/builder/8945511751514863184", + "GIT_HTTP_LOW_SPEED_LIMIT": "102400", + "GIT_HTTP_LOW_SPEED_TIME": "1800" + }, + "env_suffixes": { + "DEPOT_TOOLS_UPDATE": [ + "0", + "0" + ], + "PATH": [ + "RECIPE_REPO[depot_tools]", + "RECIPE_REPO[depot_tools]" + ] + }, + "infra_step": true, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.bot_update", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@", + "@@@STEP_TEXT@Some step text@@@", + "@@@STEP_LOG_LINE@json.output@{@@@", + "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@", + "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"monorepo\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/engine/src.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"851705163d0a071411a2461348b2fa0f4365dd2b\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src/flutter\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/engine/src/flutter.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"8d715353df333b3d997121c3d17cfe043f0a33ee\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src/third_party/dart\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/engine/src/third_party/dart.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"56b272d88fce292881d9d6a89d1a88b53f868a7f\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"flutter\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/flutter.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"ff25d17873bba4bc564d8c7217280aa254ed4541\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"monorepo\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/monorepo.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@", + "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"monorepo\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"got_buildroot_revision\": \"851705163d0a071411a2461348b2fa0f4365dd2b\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_buildroot_revision_cp\": \"refs/heads/main@{#278358}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_dart_revision\": \"56b272d88fce292881d9d6a89d1a88b53f868a7f\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_dart_revision_cp\": \"refs/heads/main@{#135384}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_engine_revision\": \"8d715353df333b3d997121c3d17cfe043f0a33ee\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_engine_revision_cp\": \"refs/heads/main@{#14355}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_flutter_revision\": \"ff25d17873bba4bc564d8c7217280aa254ed4541\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_flutter_revision_cp\": \"refs/heads/main@{#268536}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_monorepo_revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_monorepo_revision_cp\": \"refs/heads/main@{#255931}\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"46cec4dbb087a7b43490e8c82b6899fa32937bd9\"@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"root\": \"monorepo\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/engine/src.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"851705163d0a071411a2461348b2fa0f4365dd2b\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src/flutter\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/engine/src/flutter.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"8d715353df333b3d997121c3d17cfe043f0a33ee\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"engine/src/third_party/dart\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/engine/src/third_party/dart.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"56b272d88fce292881d9d6a89d1a88b53f868a7f\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"flutter\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/flutter.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"ff25d17873bba4bc564d8c7217280aa254ed4541\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"monorepo\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@", + "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/monorepo.git\", @@@", + "@@@STEP_LOG_LINE@json.output@ \"revision\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@", + "@@@STEP_LOG_LINE@json.output@ }, @@@", + "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@", + "@@@STEP_LOG_LINE@json.output@}@@@", + "@@@STEP_LOG_END@json.output@@@", + "@@@SET_BUILD_PROPERTY@got_buildroot_revision@\"851705163d0a071411a2461348b2fa0f4365dd2b\"@@@", + "@@@SET_BUILD_PROPERTY@got_buildroot_revision_cp@\"refs/heads/main@{#278358}\"@@@", + "@@@SET_BUILD_PROPERTY@got_dart_revision@\"56b272d88fce292881d9d6a89d1a88b53f868a7f\"@@@", + "@@@SET_BUILD_PROPERTY@got_dart_revision_cp@\"refs/heads/main@{#135384}\"@@@", + "@@@SET_BUILD_PROPERTY@got_engine_revision@\"8d715353df333b3d997121c3d17cfe043f0a33ee\"@@@", + "@@@SET_BUILD_PROPERTY@got_engine_revision_cp@\"refs/heads/main@{#14355}\"@@@", + "@@@SET_BUILD_PROPERTY@got_flutter_revision@\"ff25d17873bba4bc564d8c7217280aa254ed4541\"@@@", + "@@@SET_BUILD_PROPERTY@got_flutter_revision_cp@\"refs/heads/main@{#268536}\"@@@", + "@@@SET_BUILD_PROPERTY@got_monorepo_revision@\"2d72510e447ab60a9728aeea2362d8be2cbd7789\"@@@", + "@@@SET_BUILD_PROPERTY@got_monorepo_revision_cp@\"refs/heads/main@{#255931}\"@@@", + "@@@SET_BUILD_PROPERTY@got_revision@\"46cec4dbb087a7b43490e8c82b6899fa32937bd9\"@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_REPO[depot_tools]/gclient.py", + "runhooks" + ], + "env": { + "DEPOT_TOOLS_REPORT_BUILD": "project/ci/builder/8945511751514863184" + }, + "env_suffixes": { + "DEPOT_TOOLS_UPDATE": [ + "0" + ], + "PATH": [ + "RECIPE_REPO[depot_tools]", + "RECIPE_REPO[depot_tools]" + ] + }, + "luci_context": { + "realm": { + "name": "project:ci" + }, + "resultdb": { + "current_invocation": { + "name": "invocations/build:8945511751514863184", + "update_token": "token" + }, + "hostname": "rdbhost" + } + }, + "name": "Checkout source code.gclient runhooks", + "~followup_annotations": [ + "@@@STEP_NEST_LEVEL@1@@@" + ] + }, + { + "name": "$result" + } +] \ No newline at end of file
diff --git a/recipe_modules/repo_util/examples/full.expected/monorepo_wrong_host.json b/recipe_modules/repo_util/examples/full.expected/monorepo_wrong_host.json index 597bd92..7691df6 100644 --- a/recipe_modules/repo_util/examples/full.expected/monorepo_wrong_host.json +++ b/recipe_modules/repo_util/examples/full.expected/monorepo_wrong_host.json
@@ -1005,7 +1005,7 @@ "Traceback (most recent call last):", " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/examples/full.py\", line 32, in RunSteps", " api.repo_util.monorepo_checkout(api.path['start_dir'], {}, {})", - " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/api.py\", line 126, in monorepo_checkout", + " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/api.py\", line 141, in monorepo_checkout", " raise ValueError(", "ValueError('Input reference is not on dart.googlesource.com/monorepo')" ]
diff --git a/recipe_modules/repo_util/examples/full.py b/recipe_modules/repo_util/examples/full.py index f998c30..4e94fcb 100644 --- a/recipe_modules/repo_util/examples/full.py +++ b/recipe_modules/repo_util/examples/full.py
@@ -49,6 +49,14 @@ ) yield api.test('failed_flutter_environment') yield api.test( + 'monorepo_release', api.repo_util.flutter_environment_data(), + api.properties(git_branch='beta'), + api.buildbucket.ci_build( + git_repo='https://dart.googlesource.com/monorepo', + git_ref='refs/heads/beta' + ) + ) + yield api.test( 'monorepo', api.repo_util.flutter_environment_data(), api.buildbucket.ci_build( git_repo='https://dart.googlesource.com/monorepo',
diff --git a/recipe_modules/repo_util/examples/unsupported.expected/unsupported.json b/recipe_modules/repo_util/examples/unsupported.expected/unsupported.json index 622f444..f08701e 100644 --- a/recipe_modules/repo_util/examples/unsupported.expected/unsupported.json +++ b/recipe_modules/repo_util/examples/unsupported.expected/unsupported.json
@@ -9,7 +9,7 @@ "Traceback (most recent call last):", " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/examples/unsupported.py\", line 15, in RunSteps", " api.repo_util.checkout('unsupported_repo', repo_dir)", - " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/api.py\", line 201, in checkout", + " File \"RECIPE_REPO[flutter]/recipe_modules/repo_util/api.py\", line 216, in checkout", " raise ValueError('Unsupported repo: %s' % name)", "ValueError('Unsupported repo: unsupported_repo')" ]