From 7e4d967a61690b28d69e6edd82a7a26822a72c5e Mon Sep 17 00:00:00 2001 From: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon, 18 Jul 2022 14:20:04 -0700 Subject: [PATCH] Log pull request for autosubmit triage (#1988) --- auto_submit/lib/requests/check_pull_request.dart | 4 ++-- auto_submit/lib/service/validation_service.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auto_submit/lib/requests/check_pull_request.dart b/auto_submit/lib/requests/check_pull_request.dart index d168732b2..3b71355b2 100644 --- a/auto_submit/lib/requests/check_pull_request.dart +++ b/auto_submit/lib/requests/check_pull_request.dart @@ -53,7 +53,7 @@ class CheckPullRequest extends AuthenticatedRequestHandler { final String messageData = message.message!.data!; final rawBody = json.decode(String.fromCharCodes(base64.decode(messageData))) as Map; final PullRequest pullRequest = PullRequest.fromJson(rawBody); - log.info('Processing PR: $pullRequest'); + log.info('Processing PR: $rawBody'); if (processingLog.contains(pullRequest.number)) { // Ack duplicate. log.info('Ack the duplicated message : ${message.ackId!}.'); @@ -61,7 +61,7 @@ class CheckPullRequest extends AuthenticatedRequestHandler { continue; } else { await approver.approve(pullRequest); - log.info('Approved pull request: $pullRequest'); + log.info('Approved pull request: $rawBody'); processingLog.add(pullRequest.number!); } futures.add(validationService.processMessage(pullRequest, message.ackId!, pubsub)); diff --git a/auto_submit/lib/service/validation_service.dart b/auto_submit/lib/service/validation_service.dart index fb4a69e89..9e19cc6eb 100644 --- a/auto_submit/lib/service/validation_service.dart +++ b/auto_submit/lib/service/validation_service.dart @@ -61,7 +61,7 @@ class ValidationService { /// Processes a pub/sub message associated with PullRequest event. Future processMessage(github.PullRequest messagePullRequest, String ackId, PubSub pubsub) async { if (!await shouldProcess(messagePullRequest)) { - log.info('Shout not process $messagePullRequest, and ack the message.'); + log.info('Shout not process ${messagePullRequest.toJson()}, and ack the message.'); await pubsub.acknowledge('auto-submit-queue-sub', ackId); return; }