fix: result-status
This commit is contained in:
parent
7546164916
commit
80c8bd517f
|
@ -71,6 +71,18 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config:
|
||||||
if task_stage.result_detail is not None:
|
if task_stage.result_detail is not None:
|
||||||
result_detail_parser.with_.update(task_stage.result_detail)
|
result_detail_parser.with_.update(task_stage.result_detail)
|
||||||
|
|
||||||
|
if "dummy" in task_stage.parsers:
|
||||||
|
dummy_parser = next(p for p in conf_stage.parsers if p.name == "dummy")
|
||||||
|
if task_stage.dummy is not None:
|
||||||
|
dummy_parser.with_.update(task_stage.dummy)
|
||||||
|
|
||||||
|
if "result-status" in task_stage.parsers:
|
||||||
|
result_status_parser = next(
|
||||||
|
p for p in conf_stage.parsers if p.name == "result-status"
|
||||||
|
)
|
||||||
|
if task_stage.result_status is not None:
|
||||||
|
result_status_parser.with_.update(task_stage.result_status)
|
||||||
|
|
||||||
conf_stage = fix_comment(task_stage, conf_stage)
|
conf_stage = fix_comment(task_stage, conf_stage)
|
||||||
conf_stage = fix_keyword(task_stage, conf_stage)
|
conf_stage = fix_keyword(task_stage, conf_stage)
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,10 @@ def fix_comment(task_stage: TaskStage, conf_stage: ResultStage) -> ResultStage:
|
||||||
for parser in task_stage.parsers:
|
for parser in task_stage.parsers:
|
||||||
if parser in comment_parser:
|
if parser in comment_parser:
|
||||||
comment_parser_ = next(p for p in conf_stage.parsers if p.name == parser)
|
comment_parser_ = next(p for p in conf_stage.parsers if p.name == parser)
|
||||||
if getattr(task_stage, parser, None) is not None:
|
if getattr(task_stage, parser.replace("-", "_"), None) is not None:
|
||||||
comment_parser_.with_.update(getattr(task_stage, parser))
|
comment_parser_.with_.update(
|
||||||
|
getattr(task_stage, parser.replace("-", "_"))
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
return conf_stage
|
return conf_stage
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"/<function",
|
"/<function",
|
||||||
"get_temp_directory",
|
"get_temp_directory",
|
||||||
"at",
|
"at",
|
||||||
"0x7f1db69b71a0>/repo-health-checker",
|
"0x7fbd328431a0>/repo-health-checker",
|
||||||
"-root=.",
|
"-root=.",
|
||||||
"-repoSize=50.5",
|
"-repoSize=50.5",
|
||||||
"-meta=main.py",
|
"-meta=main.py",
|
||||||
|
@ -71,8 +71,8 @@
|
||||||
"cpuRateLimit": 0,
|
"cpuRateLimit": 0,
|
||||||
"cpuSetLimit": "",
|
"cpuSetLimit": "",
|
||||||
"copyIn": {
|
"copyIn": {
|
||||||
"//tmp/repo-checker-90ztqsoq/repo-health-checker": {
|
"//tmp/repo-checker-04l9les6/repo-health-checker": {
|
||||||
"src": "//tmp/repo-checker-41mcx5_x/repo-health-checker",
|
"src": "//tmp/repo-checker-_34sofm5/repo-health-checker",
|
||||||
"content": null,
|
"content": null,
|
||||||
"fileId": null,
|
"fileId": null,
|
||||||
"name": null,
|
"name": null,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user