mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Compass-ci

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
compass-ci@openeuler.org

April 2021

  • 18 participants
  • 382 discussions
[PATCH v2 compass-ci] delimiter: consume bisect process job by the bad job tbox_group
by Cao Xueliang 16 Apr '21

16 Apr '21
Sometimes we set a queue in a job, then we delete the testbox who can consume the queue, if we submit the job to the queue, no testbox can consume it, so we consume the bisect process job by the bad job tbox_group. Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- src/delimiter/utils.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index dbc42ef..1aac6b3 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -137,9 +137,10 @@ module Utils job['my_email'] = ENV['my_email'] job['my_token'] = ENV['secrets_my_token'] job['bad_job_id'] = job_id - job['queue'] = "#{job['testbox'].split('.')[0]}-bisect" + job['testbox'] = job['tbox_group'] job.delete('id') + job.delete('queue') return job end -- 2.23.0
1 0
0 0
[PATCH v1 compass-ci 1/2] delimiter: consume job by the bad job queue
by Cao Xueliang 16 Apr '21

16 Apr '21
Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- src/delimiter/utils.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index dbc42ef..a0d4196 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -137,7 +137,6 @@ module Utils job['my_email'] = ENV['my_email'] job['my_token'] = ENV['secrets_my_token'] job['bad_job_id'] = job_id - job['queue'] = "#{job['testbox'].split('.')[0]}-bisect" job.delete('id') -- 2.23.0
1 1
0 0
[PATCH v1 compass-ci 2/2] container/etcd: fix Error reading socket: Connection reset by peer
by Cao Xueliang 16 Apr '21

16 Apr '21
We should pass the start script params to /bin/etcd program. Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- container/etcd/entry.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/container/etcd/entry.sh b/container/etcd/entry.sh index 4bfea1e..16c8d00 100755 --- a/container/etcd/entry.sh +++ b/container/etcd/entry.sh @@ -3,6 +3,6 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. crond -/bin/etcd -exec "$@" +/bin/etcd "$@" +exec -- 2.23.0
1 0
0 0
[PATCH compass-ci 4/4] sparrow: expose ASSISTANT_PORT/HOST in scheduler
by Cao Xueliang 16 Apr '21

16 Apr '21
Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- sparrow/3-code/dev-env | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sparrow/3-code/dev-env b/sparrow/3-code/dev-env index bb576c7..76686a5 100755 --- a/sparrow/3-code/dev-env +++ b/sparrow/3-code/dev-env @@ -28,6 +28,8 @@ server_name=$(hostname | cut -f1 -d.) : ${INITRD_HTTP_PORT:=8800} : ${assist_result_host:=$server_ip} : ${ASSIST_RESULT_PORT:=8102} +: ${assistant_host:=$server_ip} +: ${ASSISTANT_PORT:=8101} : ${result_webdav_host:=$server_ip} : ${RESULT_WEBDAV_PORT:=3080} : ${MASTER_FLUENTD_HOST:=$server_ip} @@ -107,6 +109,8 @@ INITRD_HTTP_HOST: $initrd_http_host INITRD_HTTP_PORT: $INITRD_HTTP_PORT ASSIST_RESULT_HOST: $assist_result_host ASSIST_RESULT_PORT: $ASSIST_RESULT_PORT +ASSISTANT_HOST: $assistant_host +ASSISTANT_PORT: $ASSISTANT_PORT RESULT_WEBDAV_HOST: $result_webdav_host RESULT_WEBDAV_PORT: $RESULT_WEBDAV_PORT MASTER_FLUENTD_HOST: $MASTER_FLUENTD_HOST @@ -149,6 +153,8 @@ INITRD_HTTP_HOST: INITRD_HTTP_PORT: ASSIST_RESULT_HOST: ASSIST_RESULT_PORT: +ASSISTANT_HOST: +ASSISTANT_PORT: RESULT_WEBDAV_HOST: RESULT_WEBDAV_PORT: DOCKER_REGISTRY_HOST: -- 2.23.0
1 0
0 0
[PATCH compass-ci 3/4] lib: add assistant_client and use it in mail_bisect_result
by Cao Xueliang 16 Apr '21

16 Apr '21
Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- lib/assistant_client.rb | 24 ++++++++++++++++++++++++ lib/constants.rb | 3 +++ lib/mail_bisect_result.rb | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 lib/assistant_client.rb diff --git a/lib/assistant_client.rb b/lib/assistant_client.rb new file mode 100644 index 0000000..c951f2b --- /dev/null +++ b/lib/assistant_client.rb @@ -0,0 +1,24 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require 'json' +require 'base64' +require 'rest-client' +require_relative 'constants' + +class AssistantClient + def initialize(host = ASSISTANT_HOST, port = ASSISTANT_PORT) + @host = host + @port = port + end + + def get_mail_list(type) + resource = RestClient::Resource.new("http://#{@host}:#{@port}/get_mail_list/#{type}") + response = resource.get() + return nil unless response.code == 200 + + return JSON.parse(response.body) + end +end diff --git a/lib/constants.rb b/lib/constants.rb index 03b1e40..11927f9 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -20,6 +20,9 @@ SRV_HTTP_GIT_PORT ||= config['SRV_HTTP_GIT_PORT'] || ENV['SRV_HTTP_GIT_PORT'] || SRV_HTTP_DOMAIN ||= config['SRV_HTTP_DOMAIN'] || ENV['SRV_HTTP_DOMAIN'] || 'api.compass-ci.openeuler.org' +ASSISTANT_HOST ||= config['ASSISTANT_HOST'] || ENV['ASSISTANT_HOST'] || '172.17.0.1' +ASSISTANT_PORT ||= config['ASSISTANT_PORT'] || ENV['ASSISTANT_PORT'] || 8101 + ASSIST_RESULT_HOST ||= config['ASSIST_RESULT_HOST'] || ENV['ASSIST_RESULT_HOST'] || '172.17.0.1' ASSIST_RESULT_PORT ||= config['ASSIST_RESULT_PORT'] || ENV['ASSIST_RESULT_PORT'] || 8102 diff --git a/lib/mail_bisect_result.rb b/lib/mail_bisect_result.rb index 782c702..5a71225 100644 --- a/lib/mail_bisect_result.rb +++ b/lib/mail_bisect_result.rb @@ -6,7 +6,7 @@ require_relative 'git' require_relative 'es_query' require_relative 'constants' require_relative 'mail_client' -require_relative 'parse_mail_list' +require_relative 'assistant_client' require_relative 'assign_account_client' # compose and send email for bisect result @@ -25,7 +25,7 @@ class MailBisectResult end def parse_mail_info - mail_hash = parse_mail_list('delimiter') + mail_hash = AssistantClient.new.get_mail_list('delimiter') @to = mail_hash['to'] if mail_hash.key?('to') @bcc = mail_hash['bcc'] if mail_hash.key?('bcc') raise 'Need to add bcc email for bisect report.' unless @bcc -- 2.23.0
1 0
0 0
[PATCH compass-ci 2/4] container/assistant: refactor assistant container
by Cao Xueliang 16 Apr '21

16 Apr '21
1. Refactor assistant container. 2. Add get_mail_list function. Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- container/assistant/Dockerfile | 17 ++++---- container/assistant/build | 4 +- container/assistant/routes.rb | 20 ++++++--- container/assistant/start | 51 +++++++++++++++------- container/assistant/views/get_mail_list.rb | 9 ++++ 5 files changed, 69 insertions(+), 32 deletions(-) create mode 100644 container/assistant/views/get_mail_list.rb diff --git a/container/assistant/Dockerfile b/container/assistant/Dockerfile index 04d2da0..3299858 100644 --- a/container/assistant/Dockerfile +++ b/container/assistant/Dockerfile @@ -1,16 +1,15 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. -FROM debian +FROM alpine:3.11 MAINTAINER Cao Xueliang <caoxl78320(a)163.com> -ENV DEBIAN_FRONTEND noninteractive +RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com|g' /etc/apk/repositories && \ + apk update && \ + apk add --no-cache 'ruby-dev' 'ruby-etc' \ + 'g++' 'gcc' 'pcre' 'libevent' 'make' 'git' 'bash' 'grep' 'coreutils' 'curl' 'util-linux' -RUN apt-get update && \ - apt-get install -y ruby-json ruby-sinatra curl - -COPY routes.rb /usr/local/bin/ -COPY views /usr/local/bin/views/ - -CMD ["/usr/local/bin/routes.rb"] +RUN umask 002 && \ + gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ + gem install rest-client activesupport json yaml elasticsearch sinatra puma terminal-table diff --git a/container/assistant/build b/container/assistant/build index 89a8a97..6f739d6 100755 --- a/container/assistant/build +++ b/container/assistant/build @@ -4,6 +4,6 @@ . ../defconfig.sh -docker_skip_rebuild "debian:assistant" +docker_skip_rebuild "assistant" -docker build -t debian:assistant . +docker build -t assistant . diff --git a/container/assistant/routes.rb b/container/assistant/routes.rb index 54d3670..232ec8c 100755 --- a/container/assistant/routes.rb +++ b/container/assistant/routes.rb @@ -8,24 +8,32 @@ require 'json' require 'open3' require_relative './views/locate_files' +require_relative './views/get_mail_list' -set :bind, '0.0.0.0' -set :port, 8101 +configure do + set :bind, '0.0.0.0' + set :port, ENV['ASSISTANT_PORT'] +end post '/locate_files' do request.body.rewind begin data = JSON.parse request.body.read - rescue JSON::ParserError - return [400, 'parse json params error'] + result = locate_files(data) + rescue StandardError => e + return [400, e.backtrace.inspect] end + [200, result.to_json] +end + +get '/get_mail_list/:type' do begin - result = locate_files(data) + result = get_mail_list(params[:type]) rescue StandardError => e return [400, e.backtrace.inspect] end - [200, result.to_json] + return [200, result.to_json] end diff --git a/container/assistant/start b/container/assistant/start index 5f7822e..87c1801 100755 --- a/container/assistant/start +++ b/container/assistant/start @@ -1,21 +1,42 @@ -#!/bin/bash +#!/usr/bin/env ruby # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true -. $CCI_SRC/container/defconfig.sh +require 'set' +require_relative '../defconfig.rb' -docker_rm assistant +names = Set.new %w[ + ASSISTANT_HOST + ASSISTANT_PORT +] -cmd=( - docker run - --restart=always - --name assistant - -u nobody - -d - -p 8101:8101 - -v /srv/initrd:/srv/initrd - -v /etc/localtime:/etc/localtime:ro - debian:assistant -) +defaults = relevant_defaults(names) +env = docker_env(defaults) -"${cmd[@]}" +DEFAULT_LKP = '/c/lkp-tests' +DEFAULT_CCI = '/c/compass-ci' +DEFAULT_CONFIG_DIR = '/etc/compass-ci' +ASSISTANT_PORT = defaults['ASSISTANT_PORT'] +docker_rm 'assistant' + +cmd = %w[ + docker run + --name assistant + --restart=always + -d +] + env + %W[ + -e LKP_SRC=#{DEFAULT_LKP} + -e CCI_SRC=#{DEFAULT_CCI} + -p #{ASSISTANT_PORT}:#{ASSISTANT_PORT} + -v #{ENV['LKP_SRC']}:#{DEFAULT_LKP} + -v #{ENV['CCI_SRC']}:#{DEFAULT_CCI} + -v #{DEFAULT_CONFIG_DIR}:#{DEFAULT_CONFIG_DIR}:ro + -v /etc/localtime:/etc/localtime:ro + -w #{DEFAULT_CCI}/container/assistant/ + assistant +] + +cmd += ['sh', '-c', 'umask 002 && ruby ./routes.rb'] + +system(*cmd) diff --git a/container/assistant/views/get_mail_list.rb b/container/assistant/views/get_mail_list.rb new file mode 100644 index 0000000..66a1872 --- /dev/null +++ b/container/assistant/views/get_mail_list.rb @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require_relative "#{ENV['CCI_SRC']}/lib/parse_mail_list" + +def get_mail_list(type) + return parse_mail_list(type) +end -- 2.23.0
1 0
0 0
[PATCH compass-ci 1/4] delimiter: consume job by the bad job queue
by Cao Xueliang 16 Apr '21

16 Apr '21
Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- src/delimiter/utils.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index dbc42ef..a0d4196 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -137,7 +137,6 @@ module Utils job['my_email'] = ENV['my_email'] job['my_token'] = ENV['secrets_my_token'] job['bad_job_id'] = job_id - job['queue'] = "#{job['testbox'].split('.')[0]}-bisect" job.delete('id') -- 2.23.0
1 0
0 0
[PATCH compass-ci] container/crystal-shards: fix executing command: shards version got exit 1
by Cao Xueliang 16 Apr '21

16 Apr '21
Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- container/crystal-shards/shard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/container/crystal-shards/shard.yml b/container/crystal-shards/shard.yml index 3466bc5..b9662af 100644 --- a/container/crystal-shards/shard.yml +++ b/container/crystal-shards/shard.yml @@ -35,3 +35,4 @@ dependencies: branch: master amqp-client: github: cloudamqp/amqp-client.cr + version: 1.0.0 -- 2.23.0
1 0
0 0
[PATCH compass-ci 2/2] lib/sched.cr: add tbox_group to testbox
by Wu Zhende 16 Apr '21

16 Apr '21
It can be used to display statistics on a certain type of machine. Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/lib/sched.cr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 1359f95..7a9e4d8 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -174,10 +174,12 @@ class Sched job["job_state"] = "boot" state = "booting" job_id = job["id"] + tbox_group = job["tbox_group"] else deadline = nil job_id = "" state = "requesting" + tbox_group = JobHelper.match_tbox_group(testbox.to_s) end type = get_type(testbox) @@ -189,7 +191,8 @@ class Sched "deadline" => deadline, "queues" => queues, "type" => type, - "name" => testbox + "name" => testbox, + "tbox_group" => tbox_group } @redis.update_wtmp(testbox.to_s, hash) -- 2.23.0
1 0
0 0
[PATCH compass-ci 1/2] lib/job.cr: fix tbox_group generation rule
by Wu Zhende 16 Apr '21

16 Apr '21
[Why] The tbox generated by this method is different from the tbox generated by the lkp submit method. testbox: dc-8g.wuzhende-3455481 this method get: dc-8g.wuzhende lkp mothed get: dc-8g Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/lib/job.cr | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index b6bb730..200ba2b 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -26,11 +26,7 @@ end module JobHelper def self.match_tbox_group(testbox : String) - tbox_group = testbox - if testbox =~ /(.*)-\d+$/ - tbox_group = $1 - end - return tbox_group + testbox.split(/\.|--/)[0] end def self.service_path(path) -- 2.23.0
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • ...
  • 39
  • Older →

HyperKitty Powered by HyperKitty