Revert "Add a flag to generate_buildbot_json.py to disable builder check."
This reverts commit 70223c923ca7e8e6d2e1aff967f673f207902a48.
Reason for revert: The UpstreamBranch() function returns a commit hash when run locally, so the check would not function properly on upload.
Original change's description:
> Add a flag to generate_buildbot_json.py to disable builder check.
>
> Currently the project.pyl file in the infra/config directory disables
> the builder existence check, but this fails for cherry-picks for the
> clank source side specs because the infra/config directory is in
> src-internal and the presubmit builder doesn't check out the
> corresponding branch of src-internal when executing against a branch CL.
> Adding a flag will allow it to be specified at the presubmit check
> definition and consider the CL being tested rather than having to rely
> on file contents.
>
> Bug: 1220089
> Change-Id: I502fbbb195ec2ba67dd59dd2443a5ae98551d50f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2965737
> Commit-Queue: Garrett Beaty <[email protected]>
> Reviewed-by: Dirk Pranke <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#892826}
Bug: 1220089
Change-Id: I51f7dd8fbecbcd58b76adec9a210d309b746ddb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2965865
Auto-Submit: Garrett Beaty <[email protected]>
Commit-Queue: Rubber Stamper <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Cr-Commit-Position: refs/heads/master@{#893001}
diff --git a/testing/buildbot/generate_buildbot_json.py b/testing/buildbot/generate_buildbot_json.py
index fa1b2204..7d3d20d8 100755
--- a/testing/buildbot/generate_buildbot_json.py
+++ b/testing/buildbot/generate_buildbot_json.py
@@ -321,11 +321,6 @@
" List all bots running 'test1' " +
"(make sure you have quotes):\n" + " --query test/'test1'/bots"))
parser.add_argument(
- '--disable-builder-existence-check',
- action='store_true',
- help='Disable the check that builders in waterfalls.pyl '
- 'actually exist in the infra/config files')
- parser.add_argument(
'-n',
'--new-files',
action='store_true',
@@ -1477,18 +1472,10 @@
# their presubmit to run `generate_buildbot_json.py -c`, so that the tree
# never ends up in an invalid state.
- # We may not want to enforce that the builders in waterfalls.pyl are
- # actually defined in LUCI: when we set up branch projects we don't want to
- # have to make changes to the testing/buildbot *.pyl files to remove the
- # builders that are not defined on the branch
- if self.args.disable_builder_existence_check:
- return None
-
- # If the --disable-builder-existence-check flag isn't set, the builder
- # existence check might be disabled by the project.pyl file in the
- # infra/config directory
- # TODO(https://crbug.com1220089) Remove the project.pyl code once all
- # presubmits are correctly passing the --disable-builder-existence-check
+ # Get the generated project.pyl so we can check if we should be enforcing
+ # that the specs are for builders that actually exist
+ # If not, return None to indicate that we won't enforce that builders in
+ # waterfalls.pyl are defined in LUCI
project_pyl_path = os.path.join(self.args.infra_config_dir, 'generated',
'project.pyl')
if os.path.exists(project_pyl_path):