[why] load job from result's job yaml has key "my_email", like my_email: compass-ci-robot@qq.com my_name: compass-ci-robot lab: z9
reproduction task: my_email: xxxxx my_name: xxxx lab: xxx
==> check the field my_email fail
each of these fields needs to be reset when submit job.yaml for reprodution task. however, these fields already exist in yaml file, can not to be reload, so delete these fields when submit reproduction job.
Signed-off-by: Li Ping 1477412247@qq.com --- lib/job.rb | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index a03261537..2b122c01d 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -259,6 +259,11 @@ class Job hash.delete('override') end
+ if hash.has_key?('id') + d_keys = ["my_name", "my_email", "lab"] + hash.delete_if { |k| d_keys.include? k } + end + revise_hash(hash, load_include_yamls(@default_yamls), false) unless @default_yamls.empty? revise_hash(hash, load_include_yamls(@override_yamls), true) unless @override_yamls.empty? revise_hash(hash, @overrides, true) unless @overrides.empty?