From 75631dd07d8c99df6d33655e9e03aa3ab37dd6e5 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Thu, 8 Dec 2016 21:00:30 -0800 Subject: [PATCH 1/3] re(move) build dir --- lib/thumbs/pull_request_worker.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/thumbs/pull_request_worker.rb b/lib/thumbs/pull_request_worker.rb index b3a0285..fcae867 100644 --- a/lib/thumbs/pull_request_worker.rb +++ b/lib/thumbs/pull_request_worker.rb @@ -920,6 +920,10 @@ def comment_code_approvals code_reviews end + def remove_build_dir + FileUtils.mv(@build_dir, "#{@build_dir}.0") + end + def parse_thumbot_command(text_body) result_lines = text_body.split(/\n/).grep(/^thumbot/) return nil unless result_lines.length > 0 @@ -943,6 +947,7 @@ def run_thumbot_command(command) def thumbot_retry debug_message "received retry command" unpersist_build_status + remove_build_dir set_build_progress(:in_progress) validate set_build_progress(:completed) From f739165cbdc4775b4bfd42b0e7e4760ec7c61fe1 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Thu, 8 Dec 2016 22:13:55 -0800 Subject: [PATCH 2/3] add clear progress comment when retry --- lib/thumbs/pull_request_worker.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/thumbs/pull_request_worker.rb b/lib/thumbs/pull_request_worker.rb index fcae867..c91a26f 100644 --- a/lib/thumbs/pull_request_worker.rb +++ b/lib/thumbs/pull_request_worker.rb @@ -948,6 +948,7 @@ def thumbot_retry debug_message "received retry command" unpersist_build_status remove_build_dir + clear_build_progress_comment set_build_progress(:in_progress) validate set_build_progress(:completed) From b73c84f2308730308554d0dd4518556235ff1651 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Thu, 8 Dec 2016 22:20:39 -0800 Subject: [PATCH 3/3] multiple retries --- lib/thumbs/pull_request_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thumbs/pull_request_worker.rb b/lib/thumbs/pull_request_worker.rb index c91a26f..c16a1ca 100644 --- a/lib/thumbs/pull_request_worker.rb +++ b/lib/thumbs/pull_request_worker.rb @@ -921,7 +921,7 @@ def comment_code_approvals end def remove_build_dir - FileUtils.mv(@build_dir, "#{@build_dir}.0") + FileUtils.mv(@build_dir, "#{@build_dir}.#{DateTime.now.strftime("%s")}") end def parse_thumbot_command(text_body)