24 'https://ci.chromium.org/p/flutter/g/engine/builders',
26 curl_result = subprocess.run(
28 universal_newlines=
True,
31 if curl_result.returncode != 0:
32 print(
'Failed to fetch builder list: stderr:\n%s' % curl_result.stderr)
37 's:.*aria-label="builder buildbucket/luci\\.flutter\\.prod/([^/]+)".*:\\1:p',
39 sed_result = subprocess.run(
41 input=curl_result.stdout,
43 universal_newlines=
True,
45 if sed_result.returncode != 0:
46 print(
'Failed to fetch builder list: stderr:\n%s' % sed_result.stderr)
47 return list(
set(sed_result.stdout.splitlines()))
51 parser = argparse.ArgumentParser(description=
'Reruns Engine LUCI prod builds')
56 help=
'Force artifact upload, overwriting existing artifacts.'
58 parser.add_argument(
'--all', action=
'store_true', default=
False, help=
'Re-run all builds.')
59 parser.add_argument(
'--builder', type=str, help=
'The builer to rerun.')
60 parser.add_argument(
'--commit', type=str, required=
True, help=
'The commit to rerun.')
62 '--dry-run', action=
'store_true', help=
'Print what would be done, but do nothing.'
64 args = parser.parse_args()
66 if 'help' in vars(args)
and args.help:
72 elif args.builder ==
None:
73 print(
'Either --builder or --all is required.')
76 builders = [args.builder]
81 'print-identity-token',
83 auth_result = subprocess.run(
85 universal_newlines=
True,
88 if auth_result.returncode != 0:
89 print(
'Auth failed:\nstdout:\n%s\nstderr:\n%s' % (auth_result.stdout, auth_result.stderr))
91 auth_token = auth_result.stdout.rstrip()
93 for builder
in builders:
96 '{"Commit": "%s", "Builder": "%s", "Repo": "engine", "Properties": {"force_upload":true}}'
97 % (args.commit, builder)
100 params =
'{"Commit": "%s", "Builder": "%s", "Repo": "engine"}' % (args.commit, builder)
103 'http://flutter-dashboard.appspot.com/api/reset-prod-task',
106 'X-Flutter-IdToken: %s' % auth_token,
109 print(
'Running: %s' %
' '.
join(curl_command))
111 result = subprocess.run(curl_command)
112 if result.returncode != 0:
113 print(
'Trigger for %s failed. Aborting.' % builder)
119if __name__ ==
'__main__':
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
def print(*args, **kwargs)
static SkString join(const CommandLineFlags::StringArray &)