[Why] When use compare as: sbin/compare id=crystal.120202 id=crystal.122057 met error: /home/lwt/work4/compass-ci/lib/compare_matrixes.rb:182:in `[]': no implicit conversion of String into Integer (TypeError)
Signed-off-by: Lu Weitao luweitaobe@163.com --- lib/compare_matrixes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index fa578f6..12c1f3e 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -179,6 +179,7 @@ def get_matrixes_values(matrixes_list, latest_jobs, options) end
def latest_failure?(field, latest_jobs) + return true unless latest_jobs latest_jobs.any? { |job| job['stats'][field] } end
@@ -203,7 +204,7 @@ def matrixes_empty?(matrixes_list) return matrixes_list.any?(&:empty?) end
-def compare_matrixes(matrixes_list, suite_list, latest_jobs, matrixes_titles = nil, group_key = nil, options: {}) +def compare_matrixes(matrixes_list, suite_list, latest_jobs=nil, matrixes_titles = nil, group_key = nil, options: {}) # compare matrix in matrixes_list and print info # @matrixes_list: list consisting of matrix # @matrixes_titles: number or dimension of matrix
On Mon, Jan 25, 2021 at 07:36:57PM +0800, Lu Weitao wrote:
[Why] When use compare as: sbin/compare id=crystal.120202 id=crystal.122057 met error: /home/lwt/work4/compass-ci/lib/compare_matrixes.rb:182:in `[]': no implicit conversion of String into Integer (TypeError)
Can't see how to fix it in your change log.
Thanks, Xueliang
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/compare_matrixes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index fa578f6..12c1f3e 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -179,6 +179,7 @@ def get_matrixes_values(matrixes_list, latest_jobs, options) end
def latest_failure?(field, latest_jobs)
- return true unless latest_jobs latest_jobs.any? { |job| job['stats'][field] }
end
@@ -203,7 +204,7 @@ def matrixes_empty?(matrixes_list) return matrixes_list.any?(&:empty?) end
-def compare_matrixes(matrixes_list, suite_list, latest_jobs, matrixes_titles = nil, group_key = nil, options: {}) +def compare_matrixes(matrixes_list, suite_list, latest_jobs=nil, matrixes_titles = nil, group_key = nil, options: {}) # compare matrix in matrixes_list and print info # @matrixes_list: list consisting of matrix
# @matrixes_titles: number or dimension of matrix
2.23.0
On Mon, Jan 25, 2021 at 07:55:51PM +0800, Cao Xueliang wrote:
On Mon, Jan 25, 2021 at 07:36:57PM +0800, Lu Weitao wrote:
[Why] When use compare as: sbin/compare id=crystal.120202 id=crystal.122057 met error: /home/lwt/work4/compass-ci/lib/compare_matrixes.rb:182:in `[]': no implicit conversion of String into Integer (TypeError)
Can't see how to fix it in your change log.
ok
Thanks, Weitao
Thanks, Xueliang