diff --git a/app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart b/app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart index 77fec4e01..474da52cb 100644 --- a/app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart +++ b/app_dart/lib/src/request_handlers/presubmit_luci_subscription.dart @@ -77,7 +77,7 @@ final class PresubmitLuciSubscription extends SubscriptionHandler { return Response.emptyOk; } - final build = buildsPubSub.build; + var build = buildsPubSub.build; // Add build fields that are stored in a separate compressed buffer. build.mergeFromBuffer(ZLibCodec().decode(buildsPubSub.buildLargeFields)); @@ -104,14 +104,17 @@ final class PresubmitLuciSubscription extends SubscriptionHandler { var rescheduled = false; final isUnifiedCheckRun = userData.guardCheckRunId != null; if (build.status.isTaskFailed()) { - // if failed summary stored in github check run and unified check run. - build.summaryMarkdown = (await _luciBuildService.getBuildById( - build.id, - buildMask: bbv2.BuildMask( - // Need to use allFields as there is a bug with fieldMask and summaryMarkdown. - allFields: true, - ), - )).summaryMarkdown; + if (isUnifiedCheckRun) { + // If failed we need summaryMarkdown. For github check run flow this + // called in [GithubChecksService.updateCheckStatus(...)] + build = await _luciBuildService.getBuildById( + build.id, + buildMask: bbv2.BuildMask( + // Need to use allFields as there is a bug with fieldMask and summaryMarkdown. + allFields: true, + ), + ); + } final maxAttempt = await _getMaxAttempt( userData.commit, builderName, diff --git a/app_dart/lib/src/service/flags/unified_check_run_flow_flags.dart b/app_dart/lib/src/service/flags/unified_check_run_flow_flags.dart index a4c07536f..85cfc4752 100644 --- a/app_dart/lib/src/service/flags/unified_check_run_flow_flags.dart +++ b/app_dart/lib/src/service/flags/unified_check_run_flow_flags.dart @@ -18,7 +18,7 @@ final class UnifiedCheckRunFlow { ); /// Whether to use unified check-run flow with only one check-run created - /// for all LUCI tests or legacy check-run flow. + /// for all LUCI tests or github check-run flow. @JsonKey() final bool useForAll; diff --git a/app_dart/lib/src/service/scheduler.dart b/app_dart/lib/src/service/scheduler.dart index f03504d29..303c367df 100644 --- a/app_dart/lib/src/service/scheduler.dart +++ b/app_dart/lib/src/service/scheduler.dart @@ -948,7 +948,7 @@ $s if (kCheckRunsToIgnore.contains(check.name)) { return true; } - final flow = check.isUnifiedCheckRun ? 'unified' : 'legacy'; + final flow = check.isUnifiedCheckRun ? 'unified' : 'github'; final requestor = check.isMergeGroup ? 'merge group' : 'pull request'; final logCrumb = 'checkCompleted(${check.name}, $flow, $requestor, ${check.slug}, ${check.sha}, ${check.status})';