dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
3 changed files with 122 additions and 6 deletions
Showing only changes of commit d451fed832 - Show all commits

View File

@ -37,7 +37,7 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config:
)
jon-lee marked this conversation as resolved Outdated

where is it used?

where is it used?

this should be storing all the files that are about to be copy in or out

this should be storing all the files that are about to be copy in or out

It is as the input and output for the following functions about parsers

It is as the input and output for the following functions about parsers

so this feature is not implemented?

so this feature is not implemented?
    if not repo_conf.force_skip_health_check_on_test or not current_test:
        result_conf.stage.stages.append(get_health_check_config(repo_conf))
    cached: List[str] = []
    # Convert each stage in the task configuration
    for task_stage in task_conf.stages:
        executor_with_config, cached = get_executor_with_config(task_stage, cached)
        conf_stage = get_conf_stage(task_stage, executor_with_config)
        conf_stage = fix_result_detail(task_stage, conf_stage)
        conf_stage = fix_dummy(task_stage, conf_stage)
        conf_stage = fix_keyword(task_stage, conf_stage)
        conf_stage = fix_file(task_stage, conf_stage)
        conf_stage = fix_diff(task_stage, conf_stage, task_conf)
        result_conf.stage.stages.append(conf_stage)

it is

    for task_stage in task_conf.stages:
        executor_with_config, cached = get_executor_with_config(task_stage, cached)

this is a loop, so this cached will be updated in every round of stage

```python if not repo_conf.force_skip_health_check_on_test or not current_test: result_conf.stage.stages.append(get_health_check_config(repo_conf)) cached: List[str] = [] # Convert each stage in the task configuration for task_stage in task_conf.stages: executor_with_config, cached = get_executor_with_config(task_stage, cached) conf_stage = get_conf_stage(task_stage, executor_with_config) conf_stage = fix_result_detail(task_stage, conf_stage) conf_stage = fix_dummy(task_stage, conf_stage) conf_stage = fix_keyword(task_stage, conf_stage) conf_stage = fix_file(task_stage, conf_stage) conf_stage = fix_diff(task_stage, conf_stage, task_conf) result_conf.stage.stages.append(conf_stage) ``` it is ```python for task_stage in task_conf.stages: executor_with_config, cached = get_executor_with_config(task_stage, cached) ``` this is a loop, so this `cached` will be updated in every round of stage

The return value is unnecessary.

The return value is unnecessary.

I have a lazing coding style here, everything has get imported would get exported, so should maintain this until the end of the loop. Everything is exported in previous stage would be imported in the next stage.

I have a lazing coding style here, everything has get imported would get exported, so should maintain this until the end of the loop. Everything is exported in previous stage would be imported in the next stage.
  1. The return value is unnecessary
  2. It should be a set
1. The return value is unnecessary 2. It should be a `set`

try it yourself

try it yourself

I see why

I see why

resolved.

resolved.
# Construct healthcheck stage
healthcheck_stage = getHealthcheckConfig(repo_conf, task_conf)
healthcheck_stage = getHealthcheckConfig(repo_conf)
result_conf.stage.stages.append(healthcheck_stage)
cached: list[str] = []
# Convert each stage in the task configuration

View File

@ -36,7 +36,7 @@ def getHealthcheckCmd(repo_conf: repo.Config) -> result.Cmd:
else:
immutable_files = immutable_files + name + ","
# FIXME: need to make solution and make things easier to edit with global scope
chore = f"/tmp/repo-health-checker -root=. "
chore = f"./repo-health-checker -root=. "
args = ""
args = args + chore
args = args + repo_size
@ -51,15 +51,13 @@ def getHealthcheckCmd(repo_conf: repo.Config) -> result.Cmd:
args=args.split(),
# FIXME: easier to edit within global scope
copy_in={
f"/tmp/repo-health-checker": result.CmdFile(src=f"/tmp/repo-health-checker")
f"./repo-health-checker": result.CmdFile(src=f"./repo-health-checker")
},
)
return cmd
def getHealthcheckConfig(
repo_conf: repo.Config, task_conf: task.Config
) -> result.StageDetail:
def getHealthcheckConfig(repo_conf: repo.Config) -> result.StageDetail:
healthcheck_stage = result.StageDetail(
name="healthcheck",
group="",

View File

@ -0,0 +1,118 @@
task = "cc"
[[stages]]
name = "cc"
command = "run cc"
score = 100
parsers = []
skip = []
[stages.files]
import = []
export = []
[stages.limit]
mem = 4
cpu = 4
stderr = 4
stdout = 4
[stages.dummy]
comment = ""
score = 0
forcequit = true
[stages.result-status]
comment = ""
score = 0
forcequit = true
[stages.keyword]
keyword = []
weight = []
[stages.clangtidy]
keyword = []
weight = []
[stages.cppcheck]
keyword = []
weight = []
[stages.cpplint]
keyword = []
weight = []
[stages.result-detail]
time = true
mem = true
stdout = false
stderr = false
exitstatus = false
[stages.diff.output]
score = 0
ignorespaces = false
hide = false
forcequit = true
[stages.cases]
[[stages]]
name = "c"
command = "run c"
score = 100
parsers = []
skip = []
[stages.files]
import = []
export = []
[stages.limit]
mem = 4
cpu = 4
stderr = 4
stdout = 4
[stages.dummy]
comment = ""
score = 0
forcequit = true
[stages.result-status]
comment = ""
score = 0
forcequit = true
[stages.keyword]
keyword = []
weight = []
[stages.clangtidy]
keyword = []
weight = []
[stages.cppcheck]
keyword = []
weight = []
[stages.cpplint]
keyword = []
weight = []
[stages.result-detail]
time = true
mem = true
stdout = false
stderr = false
exitstatus = false
[stages.diff.output]
score = 0
ignorespaces = false
hide = false
forcequit = true
[stages.cases]
[release]
deadline = "null"