On Mon, Jan 25, 2021 at 11:54:28AM +0800, Cao Xueliang wrote:
On Mon, Jan 25, 2021 at 11:41:53AM +0800, Lin Jiaxin wrote:
The job is considered to be credible when its' state = finished.
"its' state = finished" => "its' filed job_state is finished"
And your subject.
Thanks, Xueliang
Thanks, Xueliang
Return true early and no need to search for error filename.
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
lib/compare_error_messages.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/compare_error_messages.rb b/lib/compare_error_messages.rb index 5f74be7..9c864a3 100644 --- a/lib/compare_error_messages.rb +++ b/lib/compare_error_messages.rb @@ -13,9 +13,12 @@ require_relative "#{ENV['LKP_SRC']}/lib/common" # the later_job_id is credible. def credible?(previous_job_id, later_job_id, error_id) es = ESQuery.new
later_es_result = es.query_by_id(later_job_id)
return true if later_es_result['job_state'] == 'finished'
previous_result_file = File.join('/srv', es.query_by_id(previous_job_id)['result_root'], 'build-pkg')
- later_result_file = File.join('/srv', es.query_by_id(later_job_id)['result_root'], 'build-pkg')
later_result_file = File.join('/srv', later_es_result['result_root'], 'build-pkg')
filenames_check = filenames_check(previous_result_file, later_result_file, error_id)
-- 2.23.0