Skip to content

Commit d963415

Browse files
author
Casey Hillers
authored
[conductor] Remove PublishChannel and use MPA command (#135884)
Move more of the playbook into conductor. The MPA command inputs are prone to human error.
1 parent e141d0a commit d963415

12 files changed

+491
-875
lines changed

dev/conductor/core/lib/src/globals.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const List<String> kReleaseChannels = <String>[...kBaseReleaseChannels, Framewor
1818

1919
const String kReleaseDocumentationUrl = 'https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process';
2020

21-
const String kLuciPackagingConsoleLink = 'https://ci.chromium.org/p/flutter/g/packaging/console';
21+
const String kLuciPackagingConsoleLink = 'https://ci.chromium.org/p/dart-internal/g/flutter_packaging/console';
2222

2323
const String kWebsiteReleasesUrl = 'https://docs.flutter.dev/development/tools/sdk/releases';
2424

dev/conductor/core/lib/src/next.dart

Lines changed: 24 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,12 @@ class NextContext extends Context {
141141
}
142142

143143
await pushWorkingBranch(engine, state.engine);
144-
case pb.ReleasePhase.CODESIGN_ENGINE_BINARIES:
145-
stdio.printStatus(<String>[
146-
'You must validate pre-submit CI for your engine PR, merge it, and codesign',
147-
'binaries before proceeding.\n',
148-
].join('\n'));
144+
case pb.ReleasePhase.VERIFY_ENGINE_CI:
145+
stdio.printStatus('You must validate post-submit CI for your engine PR and merge it');
149146
if (!autoAccept) {
150-
// TODO(fujino): actually test if binaries have been codesigned on macOS
151147
final bool response = await prompt(
152-
'Has CI passed for the engine PR and binaries been codesigned?',
148+
'Has CI passed for the engine PR?\n\n'
149+
'${state_import.luciConsoleLink(state.releaseChannel, 'engine')}'
153150
);
154151
if (!response) {
155152
stdio.printError('Aborting command.');
@@ -190,10 +187,10 @@ class NextContext extends Context {
190187
addFirst: true,
191188
);
192189
// append to list of cherrypicks so we know a PR is required
193-
state.framework.cherrypicks.add(pb.Cherrypick(
194-
appliedRevision: revision,
195-
state: pb.CherrypickState.COMPLETED,
196-
));
190+
state.framework.cherrypicks.add(pb.Cherrypick.create()
191+
..appliedRevision = revision
192+
..state = pb.CherrypickState.COMPLETED
193+
);
197194
}
198195
stdio.printStatus('Rolling new engine hash $engineRevision to framework checkout...');
199196
needsCommit = await framework.updateEngineRevision(engineRevision);
@@ -203,10 +200,10 @@ class NextContext extends Context {
203200
addFirst: true,
204201
);
205202
// append to list of cherrypicks so we know a PR is required
206-
state.framework.cherrypicks.add(pb.Cherrypick(
207-
appliedRevision: revision,
208-
state: pb.CherrypickState.COMPLETED,
209-
));
203+
state.framework.cherrypicks.add(pb.Cherrypick.create()
204+
..appliedRevision = revision
205+
..state = pb.CherrypickState.COMPLETED
206+
);
210207
}
211208

212209
final List<pb.Cherrypick> unappliedCherrypicks = <pb.Cherrypick>[];
@@ -250,83 +247,18 @@ class NextContext extends Context {
250247

251248
await pushWorkingBranch(framework, state.framework);
252249
case pb.ReleasePhase.PUBLISH_VERSION:
253-
stdio.printStatus('Please ensure that you have merged your framework PR and that');
254-
stdio.printStatus('post-submit CI has finished successfully.\n');
255-
final Remote frameworkUpstream = Remote(
256-
name: RemoteName.upstream,
257-
url: state.framework.upstream.url,
258-
);
259-
final FrameworkRepository framework = FrameworkRepository(
260-
checkouts,
261-
// We explicitly want to check out the merged version from upstream
262-
initialRef: '${frameworkUpstream.name}/${state.framework.candidateBranch}',
263-
upstreamRemote: frameworkUpstream,
264-
previousCheckoutLocation: state.framework.checkoutPath,
265-
);
266-
final String frameworkHead = await framework.reverseParse('HEAD');
267-
final Remote engineUpstream = Remote(
268-
name: RemoteName.upstream,
269-
url: state.engine.upstream.url,
270-
);
271-
final EngineRepository engine = EngineRepository(
272-
checkouts,
273-
// We explicitly want to check out the merged version from upstream
274-
initialRef: '${engineUpstream.name}/${state.engine.candidateBranch}',
275-
upstreamRemote: engineUpstream,
276-
previousCheckoutLocation: state.engine.checkoutPath,
277-
);
278-
final String engineHead = await engine.reverseParse('HEAD');
279-
if (!autoAccept) {
280-
final bool response = await prompt(
281-
'Are you ready to tag commit $frameworkHead as ${state.releaseVersion}\n'
282-
'and push to remote ${state.framework.upstream.url}?',
283-
);
284-
if (!response) {
285-
stdio.printError('Aborting command.');
286-
updateState(state, stdio.logs);
287-
return;
288-
}
289-
}
290-
await framework.tag(frameworkHead, state.releaseVersion, frameworkUpstream.name);
291-
await engine.tag(engineHead, state.releaseVersion, engineUpstream.name);
292-
case pb.ReleasePhase.PUBLISH_CHANNEL:
293-
final Remote upstream = Remote(
294-
name: RemoteName.upstream,
295-
url: state.framework.upstream.url,
296-
);
297-
final FrameworkRepository framework = FrameworkRepository(
298-
checkouts,
299-
// We explicitly want to check out the merged version from upstream
300-
initialRef: '${upstream.name}/${state.framework.candidateBranch}',
301-
upstreamRemote: upstream,
302-
previousCheckoutLocation: state.framework.checkoutPath,
303-
);
304-
final String headRevision = await framework.reverseParse('HEAD');
305-
if (!autoAccept) {
306-
// dryRun: true means print out git command
307-
await framework.pushRef(
308-
fromRef: headRevision,
309-
toRef: state.releaseChannel,
310-
remote: state.framework.upstream.url,
311-
force: force,
312-
dryRun: true,
313-
);
314-
315-
final bool response = await prompt(
316-
'Are you ready to publish version ${state.releaseVersion} to ${state.releaseChannel}?',
317-
);
318-
if (!response) {
319-
stdio.printError('Aborting command.');
320-
updateState(state, stdio.logs);
321-
return;
322-
}
323-
}
324-
await framework.pushRef(
325-
fromRef: headRevision,
326-
toRef: state.releaseChannel,
327-
remote: state.framework.upstream.url,
328-
force: force,
329-
);
250+
final String command = '''
251+
tool-proxy-cli --tool_proxy=/abns/dart-eng-tool-proxy/prod-dart-eng-tool-proxy-tool-proxy.annealed-tool-proxy \\
252+
--block_on_mpa -I flutter_release \\
253+
:git_branch ${state.framework.candidateBranch} \\
254+
:release_channel ${state.releaseChannel} \\
255+
:tag ${state.releaseVersion} \\
256+
:force false
257+
''';
258+
stdio.printStatus('Please ensure that you have merged your framework PR');
259+
stdio.printStatus('and post-submit CI has finished successfully.\n');
260+
stdio.printStatus('Run the following command, and ask a Googler');
261+
stdio.printStatus('to review the request\n\n$command');
330262
case pb.ReleasePhase.VERIFY_RELEASE:
331263
stdio.printStatus(
332264
'The current status of packaging builds can be seen at:\n'

0 commit comments

Comments
 (0)