On Mon, Oct 26, 2020 at 07:30:16PM +0800, Xiao Shenwei wrote:
[why] after one job submit, it will be add specified queue before: use tbox_group to discriminate now : use queue field to discriminate
so, we should add this field into job.yaml it's come from user's specify(job.yaml) or dafault
Some advices for your changelog:
1. subject your patch looks no modify about job.yaml, just support a new field, so subject could be follow, or other better description: `support queue field of job.yaml`
2. changelog job.yaml looks can not add the queue field, so we need describe this function in changelog.
-------- Thanks Yu Chuan
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
src/lib/job.cr | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 8f5dd36..0376f9f 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -73,6 +73,7 @@ class Job tbox_group testbox lab
- queue initrd_pkg initrd_deps initrds_uri
@@ -139,6 +140,7 @@ class Job set_kernel_params() set_lkp_server() set_sshr_port()
set_queue() end
private def append_init_field
@@ -199,6 +201,16 @@ class Job self["result_service"] = "raw_upload" end
- private def set_queue
- return if @hash.has_key?("queue")
- # set default value
- self["queue"] = tbox_group
- if tbox_group.to_s.starts_with?(/(vm|dc).*/)
self["queue"] = "#{tbox_group}.#{arch}"
- end
- end
- # if not assign tbox_group, set it to a match result from testbox # ?if job special testbox, should we just set tbox_group=textbox private def update_tbox_group_from_testbox
-- 2.23.0