From 0f0da62fed0412089ad30f1c5b9f97bf590fdb80 Mon Sep 17 00:00:00 2001 From: Kevin Chisholm Date: Wed, 20 Apr 2022 09:56:09 -0500 Subject: [PATCH] update console output to specify post release steps (#102173) * update console output to specify post release steps * move post release instructions * update instructions for beta vs stable * add logic to differentiate beta and stable steps --- dev/conductor/core/lib/src/next.dart | 3 +- dev/conductor/core/lib/src/state.dart | 64 ++++++++++++++++++++------- 2 files changed, 49 insertions(+), 18 deletions(-) diff --git a/dev/conductor/core/lib/src/next.dart b/dev/conductor/core/lib/src/next.dart index b6756b2dc3..d8b043b671 100644 --- a/dev/conductor/core/lib/src/next.dart +++ b/dev/conductor/core/lib/src/next.dart @@ -340,7 +340,8 @@ class NextContext extends Context { '\t$kLuciPackagingConsoleLink', ); if (autoAccept == false) { - final bool response = await prompt('Have all packaging builds finished successfully?'); + final bool response = await prompt( + 'Have all packaging builds finished successfully and post release announcements been completed?'); if (!response) { stdio.printError('Aborting command.'); updateState(state, stdio.logs); diff --git a/dev/conductor/core/lib/src/state.dart b/dev/conductor/core/lib/src/state.dart index b56a4db315..d0bf99730d 100644 --- a/dev/conductor/core/lib/src/state.dart +++ b/dev/conductor/core/lib/src/state.dart @@ -22,7 +22,8 @@ String luciConsoleLink(String channel, String groupName) { ['flutter', 'engine', 'packaging'].contains(groupName), 'group named $groupName not recognized', ); - final String consoleName = channel == 'master' ? groupName : '${channel}_$groupName'; + final String consoleName = + channel == 'master' ? groupName : '${channel}_$groupName'; return 'https://ci.chromium.org/p/flutter/g/$consoleName/console'; } @@ -43,15 +44,18 @@ String presentState(pb.ConductorState state) { buffer.writeln('Release channel: ${state.releaseChannel}'); buffer.writeln('Release version: ${state.releaseVersion}'); buffer.writeln(); - buffer.writeln('Release started at: ${DateTime.fromMillisecondsSinceEpoch(state.createdDate.toInt())}'); - buffer.writeln('Last updated at: ${DateTime.fromMillisecondsSinceEpoch(state.lastUpdatedDate.toInt())}'); + buffer.writeln( + 'Release started at: ${DateTime.fromMillisecondsSinceEpoch(state.createdDate.toInt())}'); + buffer.writeln( + 'Last updated at: ${DateTime.fromMillisecondsSinceEpoch(state.lastUpdatedDate.toInt())}'); buffer.writeln(); buffer.writeln('Engine Repo'); buffer.writeln('\tCandidate branch: ${state.engine.candidateBranch}'); buffer.writeln('\tStarting git HEAD: ${state.engine.startingGitHead}'); buffer.writeln('\tCurrent git HEAD: ${state.engine.currentGitHead}'); buffer.writeln('\tPath to checkout: ${state.engine.checkoutPath}'); - buffer.writeln('\tPost-submit LUCI dashboard: ${luciConsoleLink(state.releaseChannel, 'engine')}'); + buffer.writeln( + '\tPost-submit LUCI dashboard: ${luciConsoleLink(state.releaseChannel, 'engine')}'); if (state.engine.cherrypicks.isNotEmpty) { buffer.writeln('${state.engine.cherrypicks.length} Engine Cherrypicks:'); for (final pb.Cherrypick cherrypick in state.engine.cherrypicks) { @@ -60,7 +64,8 @@ String presentState(pb.ConductorState state) { } else { buffer.writeln('0 Engine cherrypicks.'); } - if (state.engine.dartRevision != null && state.engine.dartRevision.isNotEmpty) { + if (state.engine.dartRevision != null && + state.engine.dartRevision.isNotEmpty) { buffer.writeln('New Dart SDK revision: ${state.engine.dartRevision}'); } buffer.writeln('Framework Repo'); @@ -68,9 +73,11 @@ String presentState(pb.ConductorState state) { buffer.writeln('\tStarting git HEAD: ${state.framework.startingGitHead}'); buffer.writeln('\tCurrent git HEAD: ${state.framework.currentGitHead}'); buffer.writeln('\tPath to checkout: ${state.framework.checkoutPath}'); - buffer.writeln('\tPost-submit LUCI dashboard: ${luciConsoleLink(state.releaseChannel, 'flutter')}'); + buffer.writeln( + '\tPost-submit LUCI dashboard: ${luciConsoleLink(state.releaseChannel, 'flutter')}'); if (state.framework.cherrypicks.isNotEmpty) { - buffer.writeln('${state.framework.cherrypicks.length} Framework Cherrypicks:'); + buffer.writeln( + '${state.framework.cherrypicks.length} Framework Cherrypicks:'); for (final pb.Cherrypick cherrypick in state.framework.cherrypicks) { buffer.writeln('\t${cherrypick.trunkRevision} - ${cherrypick.state}'); } @@ -125,7 +132,8 @@ String phaseInstructions(pb.ConductorState state) { return [ 'You must now manually apply the following engine cherrypicks to the checkout', 'at ${state.engine.checkoutPath} in order:', - for (final pb.Cherrypick cherrypick in state.engine.cherrypicks) '\t${cherrypick.trunkRevision}', + for (final pb.Cherrypick cherrypick in state.engine.cherrypicks) + '\t${cherrypick.trunkRevision}', 'See $kReleaseDocumentationUrl for more information.', ].join('\n'); case ReleasePhase.CODESIGN_ENGINE_BINARIES: @@ -147,19 +155,24 @@ String phaseInstructions(pb.ConductorState state) { 'validate post-submit CI, and then codesign the binaries on the merge commit.', ].join('\n'); case ReleasePhase.APPLY_FRAMEWORK_CHERRYPICKS: - final List outstandingCherrypicks = state.framework.cherrypicks.where( + final List outstandingCherrypicks = + state.framework.cherrypicks.where( (pb.Cherrypick cp) { - return cp.state == pb.CherrypickState.PENDING || cp.state == pb.CherrypickState.PENDING_WITH_CONFLICT; + return cp.state == pb.CherrypickState.PENDING || + cp.state == pb.CherrypickState.PENDING_WITH_CONFLICT; }, ).toList(); if (outstandingCherrypicks.isNotEmpty) { return [ 'You must now manually apply the following framework cherrypicks to the checkout', 'at ${state.framework.checkoutPath} in order:', - for (final pb.Cherrypick cherrypick in outstandingCherrypicks) '\t${cherrypick.trunkRevision}', + for (final pb.Cherrypick cherrypick in outstandingCherrypicks) + '\t${cherrypick.trunkRevision}', ].join('\n'); } - return ['Either all cherrypicks have been auto-applied or there were none.'].join('\n'); + return [ + 'Either all cherrypicks have been auto-applied or there were none.' + ].join('\n'); case ReleasePhase.PUBLISH_VERSION: if (!requiresFrameworkPR(state)) { return 'Since there are no code changes in this release, no Framework ' @@ -182,7 +195,24 @@ String phaseInstructions(pb.ConductorState state) { case ReleasePhase.VERIFY_RELEASE: return 'Release archive packages must be verified on cloud storage: ${luciConsoleLink(state.releaseChannel, 'packaging')}'; case ReleasePhase.RELEASE_COMPLETED: - return 'This release has been completed.'; + if (state.releaseChannel == 'beta') { + return [ + 'Ensure the following post release steps are complete:', + '\t 1. Post announcement to discord', + '\t 2. Post announcement flutter release hotline chat room', + '-----------------------------------------------------------------------', + 'This release has been completed.' + ].join('\n'); + } + return [ + 'Ensure the following post release steps are complete:', + '\t 1. Update hotfix to stable wiki following documentation best practices', + '\t 2. Post announcement to flutter-announce group', + '\t 3. Post announcement to discord', + '\t 4. Post announcement flutter release hotline chat room', + '-----------------------------------------------------------------------', + 'This release has been completed.' + ].join('\n'); } // For analyzer throw ConductorException('Unimplemented phase ${state.currentPhase}'); @@ -193,8 +223,8 @@ String phaseInstructions(pb.ConductorState state) { /// First group = git host (currently must be github.com) /// Second group = account name /// Third group = repo name -final RegExp githubRemotePattern = - RegExp(r'^(git@github\.com:|https?:\/\/github\.com\/)([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)(\.git)?$'); +final RegExp githubRemotePattern = RegExp( + r'^(git@github\.com:|https?:\/\/github\.com\/)([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)(\.git)?$'); /// Parses a Git remote URL and returns the account name. /// @@ -271,8 +301,8 @@ bool requiresFrameworkPR(pb.ConductorState state) { if (requiresEnginePR(state)) { return true; } - final bool hasRequiredCherrypicks = - state.framework.cherrypicks.any((pb.Cherrypick cp) => cp.state != pb.CherrypickState.ABANDONED); + final bool hasRequiredCherrypicks = state.framework.cherrypicks + .any((pb.Cherrypick cp) => cp.state != pb.CherrypickState.ABANDONED); if (hasRequiredCherrypicks) { return true; }