[why] Use the original tbox_group of the job.
Signed-off-by: Cao Xueliang caoxl78320@163.com --- lib/git_bisect.rb | 4 +--- src/delimiter/constants.rb | 1 - src/delimiter/find-commit/bisect_run_script.rb | 9 +++------ 3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/git_bisect.rb b/lib/git_bisect.rb index d9e5cf4..c548861 100644 --- a/lib/git_bisect.rb +++ b/lib/git_bisect.rb @@ -42,7 +42,6 @@ class GitBisect @bad_job.delete('stats') @bad_job.delete('id') @bad_job.delete('error_ids') - @bad_job['tbox_group'] = DELIMITER_TBOX_GROUP end
def set_upstream @@ -75,8 +74,7 @@ class GitBisect result = `git -C #{@work_dir} bisect start #{@upstream_commit} #{@good_commit}` temp = result.split(/\n/) if temp[0].include? 'Bisecting' - result = `git -C #{@work_dir} bisect run #{BISECT_RUN_SCRIPT} #{@bad_job_id} "#{@error_id}" \ - "#{DELIMITER_TBOX_GROUP}" #{@work_dir}` + result = `git -C #{@work_dir} bisect run #{BISECT_RUN_SCRIPT} #{@bad_job_id} "#{@error_id}" #{@work_dir}` end FileUtils.rm_r(@work_dir) if Dir.exist?(@work_dir) puts "\nbisect result: #{result}" diff --git a/src/delimiter/constants.rb b/src/delimiter/constants.rb index dafc2c8..93b633d 100644 --- a/src/delimiter/constants.rb +++ b/src/delimiter/constants.rb @@ -9,4 +9,3 @@ MONITOR_PORT = ENV['MONITOR_PORT'] || '11310' TMEP_GIT_BASE = '/c/public_git' DELIMITER_TASK_QUEUE = 'delimiter' BISECT_RUN_SCRIPT = "#{ENV['CCI_SRC']}/src/delimiter/find-commit/bisect_run_script.rb" -DELIMITER_TBOX_GROUP = 'vm-2p8g--delimiter' diff --git a/src/delimiter/find-commit/bisect_run_script.rb b/src/delimiter/find-commit/bisect_run_script.rb index 539599f..d5e4226 100755 --- a/src/delimiter/find-commit/bisect_run_script.rb +++ b/src/delimiter/find-commit/bisect_run_script.rb @@ -10,18 +10,16 @@ require_relative "#{ENV['CCI_SRC']}/src/delimiter/utils"
# git bisect run class GitBisectRun - def initialize(job_id, error_id, tbox_group, work_dir) + def initialize(job_id, error_id, work_dir) @es = ESQuery.new @job_id = job_id @error_id = error_id - @tbox_group = tbox_group @work_dir = work_dir end
def git_bisect job = @es.query_by_id @job_id job.delete('stats') if job.key?('stats') - job['tbox_group'] = @tbox_group commit = `git -C #{@work_dir} log --pretty=format:"%H" -1` job['upstream_commit'] = commit get_bisect_status job @@ -41,8 +39,7 @@ end
job_id = ARGV[0] error_id = ARGV[1] -tbox_group = ARGV[2] -work_dir = ARGV[3] +work_dir = ARGV[2]
-run = GitBisectRun.new job_id, error_id, tbox_group, work_dir +run = GitBisectRun.new job_id, error_id, work_dir run.git_bisect