Implement production overwrites.
This is to allow the use of different gn commands when running on
prod and try.
Bug: https://github.com/flutter/flutter/issues/136570
Change-Id: Ie75b040b27263d980c4495d922dd2f0cf39630ef
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/57022
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index dabc6d4..1cd3c2b 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -197,6 +197,11 @@
api.flutter_deps.required_deps(env, env_prefixes, deps)
api.flutter_bcid.report_stage('compile')
gn = build.get('gn')
+
+ # If prod apply prod gn overrides.
+ if api.flutter_bcid.is_prod_build():
+ gn = build.get('postsubmit_overrides', {}).get('gn', gn)
+
if gn:
with api.context(env=env, env_prefixes=env_prefixes):
gn = list(gn)
@@ -490,7 +495,12 @@
)
yield api.test(
'test_if_not_skip_presubmit',
- api.properties(build=test_if_build, no_goma=True, git_ref="refs/pull/51183/head", git_branch="main"),
+ api.properties(
+ build=test_if_build,
+ no_goma=True,
+ git_ref="refs/pull/51183/head",
+ git_branch="main"
+ ),
api.buildbucket.ci_build(
project='flutter',
bucket='prod',
@@ -502,7 +512,12 @@
)
yield api.test(
'test_if_skip_presubmit',
- api.properties(build=test_if_build, no_goma=True, git_ref="refs/pull/51183/head", git_branch="flutter-3.17-candidate.0"),
+ api.properties(
+ build=test_if_build,
+ no_goma=True,
+ git_ref="refs/pull/51183/head",
+ git_branch="flutter-3.17-candidate.0"
+ ),
api.buildbucket.ci_build(
project='flutter',
bucket='prod',