Healthchecker cannot properly catch the error for different hash #62

Closed
opened 2024-10-17 21:29:16 +08:00 by 李衍志523370910113 · 25 comments

When testing healthchecker, we encounter following pbs:

  • healthcheck seems cannot catch differences when running on JOJ3, it works locally.
  • healthcheck works on other function, such as detecting non-ascii code
  • We don't have ERROR message on the debug-log on the server.
  • We have such ERROR message on gitea action for non-ascii stuff, but not for hash detect

By running locally, we use:

./JOJ3/build/repo-health-checker -root="PATH/TO/hteam-00" -whitelist=".gitignore" -whitelist=".*.md" -whitelist=".*.m" -whitelist=".gitattributes" -checkFileNameList=".gitignore,.gitattributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml" -checkFileSumList="a5b63323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723,d1940fabc67a3b5d278f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd"

Here is the output locally:

time=2024-10-17T21:32:40.015+08:00 level=ERROR msg="running git command:" err="exit status 128"
### Repo Size Check Failed:
error running git command: exit status 128
### Repo File Check Failed:
Checksum for /home/hydraallen/Desktop/Github/Others/hteam-00/.gitea/workflows/push.yaml failed. Expected 8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723, but got 4f4091b5e83442d46936959fefde7b657740cd76f4f3ade217726d90091d386e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them.

and currently the debug-logs on the server looks like:

2024-10-17 21:38:16.693 | INFO     | joint_teapot.workers.git:__init__:34 - repos dir: /home/tt/.cache
2024-10-17 21:38:16.693 | DEBUG    | joint_teapot.workers.gitea:__init__:67 - Gitea initialized
2024-10-17 21:38:16.696 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'fetch', '--tags', '--all', '-f'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_
newlines=False)
2024-10-17 21:38:16.980 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/master'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universa
l_newlines=False)
2024-10-17 21:38:16.995 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'clean', '-d', '-f', '-x'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newline
s=False)
2024-10-17 21:38:16.998 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'checkout', 'grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newlines=Fa
lse)
2024-10-17 21:38:17.010 | INFO     | joint_teapot.workers.gitea:create_issue:360 - Created issue "JOJ3 Result for h3 ex1 - Score: 0" in hteam-18
2024-10-17 21:38:17.034 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, univers
al_newlines=False)
2024-10-17 21:38:17.048 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/tt/.cache/engr151-joj, stdin=Non
e, shell=False, universal_newlines=False)
2024-10-17 21:38:17.053 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch-check'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, unive
rsal_newlines=False)
2024-10-17 21:38:17.057 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, universal_n
ewlines=False)
2024-10-17 21:38:17.060 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'push', '--porcelain', '--', 'origin'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, unive
rsal_newlines=True)
2024-10-17 21:38:18.493 | INFO     | joint_teapot.app:joj3_failed_table:318 - debug log to file: /home/tt/.cache/joj3/h3/ex1-debug.log
2024-10-17 21:38:18.494 | INFO     | joint_teapot.teapot:__init__:78 - Settings loaded. Canvas Course ID: 0, Gitea Organization name: engr151-24fa, Mattermost Team name: @focs.j
i.sjtu.edu.cn/mm
2024-10-17 21:38:18.494 | DEBUG    | joint_teapot.teapot:__init__:84 - Teapot initialized.
2024-10-17 21:38:18.494 | DEBUG    | joint_teapot.workers.git:__init__:33 - Git initialized
2024-10-17 21:38:18.494 | INFO     | joint_teapot.workers.git:__init__:34 - repos dir: /home/tt/.cache
2024-10-17 21:38:18.496 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'fetch', '--tags', '--all', '-f'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_
newlines=False)
2024-10-17 21:38:18.799 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/master'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universa
l_newlines=False)
2024-10-17 21:38:18.814 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'clean', '-d', '-f', '-x'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newline
s=False)
2024-10-17 21:38:18.817 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'checkout', 'grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newlines=Fa
lse)
2024-10-17 21:38:18.854 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, univers
al_newlines=False)
2024-10-17 21:38:18.871 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/tt/.cache/engr151-joj, stdin=Non
e, shell=False, universal_newlines=False)
2024-10-17 21:38:18.875 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch-check'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, unive
rsal_newlines=False)
2024-10-17 21:38:18.885 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, universal_n
ewlines=False)
2024-10-17 21:38:18.888 | DEBUG    | git.cmd:execute:1253 - Popen(['git', 'push', '--porcelain', '--', 'origin'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, unive
rsal_newlines=True)

relevant issue:

engr151-24fa/hteam-00#158 This is for the failed hash detect
engr151-24fa/hteam-00#157 This is for the success non-ascii detect success

When testing healthchecker, we encounter following pbs: - healthcheck seems cannot catch differences when running on JOJ3, it works locally. - healthcheck works on other function, such as detecting non-ascii code - We don't have `ERROR` message on the debug-log on the server. - We have such `ERROR` message on gitea action for non-ascii stuff, but not for hash detect By running locally, we use: ```bash ./JOJ3/build/repo-health-checker -root="PATH/TO/hteam-00" -whitelist=".gitignore" -whitelist=".*.md" -whitelist=".*.m" -whitelist=".gitattributes" -checkFileNameList=".gitignore,.gitattributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml" -checkFileSumList="a5b63323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723,d1940fabc67a3b5d278f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd" ``` Here is the output locally: ```bash time=2024-10-17T21:32:40.015+08:00 level=ERROR msg="running git command:" err="exit status 128" ### Repo Size Check Failed: error running git command: exit status 128 ### Repo File Check Failed: Checksum for /home/hydraallen/Desktop/Github/Others/hteam-00/.gitea/workflows/push.yaml failed. Expected 8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723, but got 4f4091b5e83442d46936959fefde7b657740cd76f4f3ade217726d90091d386e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them. ``` and currently the debug-logs on the server looks like: ```log 2024-10-17 21:38:16.693 | INFO | joint_teapot.workers.git:__init__:34 - repos dir: /home/tt/.cache 2024-10-17 21:38:16.693 | DEBUG | joint_teapot.workers.gitea:__init__:67 - Gitea initialized 2024-10-17 21:38:16.696 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'fetch', '--tags', '--all', '-f'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_ newlines=False) 2024-10-17 21:38:16.980 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/master'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universa l_newlines=False) 2024-10-17 21:38:16.995 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'clean', '-d', '-f', '-x'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newline s=False) 2024-10-17 21:38:16.998 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'checkout', 'grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newlines=Fa lse) 2024-10-17 21:38:17.010 | INFO | joint_teapot.workers.gitea:create_issue:360 - Created issue "JOJ3 Result for h3 ex1 - Score: 0" in hteam-18 2024-10-17 21:38:17.034 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, univers al_newlines=False) 2024-10-17 21:38:17.048 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/tt/.cache/engr151-joj, stdin=Non e, shell=False, universal_newlines=False) 2024-10-17 21:38:17.053 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch-check'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, unive rsal_newlines=False) 2024-10-17 21:38:17.057 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, universal_n ewlines=False) 2024-10-17 21:38:17.060 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'push', '--porcelain', '--', 'origin'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, unive rsal_newlines=True) 2024-10-17 21:38:18.493 | INFO | joint_teapot.app:joj3_failed_table:318 - debug log to file: /home/tt/.cache/joj3/h3/ex1-debug.log 2024-10-17 21:38:18.494 | INFO | joint_teapot.teapot:__init__:78 - Settings loaded. Canvas Course ID: 0, Gitea Organization name: engr151-24fa, Mattermost Team name: @focs.j i.sjtu.edu.cn/mm 2024-10-17 21:38:18.494 | DEBUG | joint_teapot.teapot:__init__:84 - Teapot initialized. 2024-10-17 21:38:18.494 | DEBUG | joint_teapot.workers.git:__init__:33 - Git initialized 2024-10-17 21:38:18.494 | INFO | joint_teapot.workers.git:__init__:34 - repos dir: /home/tt/.cache 2024-10-17 21:38:18.496 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'fetch', '--tags', '--all', '-f'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_ newlines=False) 2024-10-17 21:38:18.799 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/master'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universa l_newlines=False) 2024-10-17 21:38:18.814 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'clean', '-d', '-f', '-x'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newline s=False) 2024-10-17 21:38:18.817 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'checkout', 'grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, universal_newlines=Fa lse) 2024-10-17 21:38:18.854 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'reset', '--hard', 'origin/grading'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, univers al_newlines=False) 2024-10-17 21:38:18.871 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/tt/.cache/engr151-joj, stdin=Non e, shell=False, universal_newlines=False) 2024-10-17 21:38:18.875 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch-check'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, unive rsal_newlines=False) 2024-10-17 21:38:18.885 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'cat-file', '--batch'], cwd=/home/tt/.cache/engr151-joj, stdin=<valid stream>, shell=False, universal_n ewlines=False) 2024-10-17 21:38:18.888 | DEBUG | git.cmd:execute:1253 - Popen(['git', 'push', '--porcelain', '--', 'origin'], cwd=/home/tt/.cache/engr151-joj, stdin=None, shell=False, unive rsal_newlines=True) ``` relevant issue: https://focs.ji.sjtu.edu.cn/git/engr151-24fa/hteam-00/issues/158 This is for the failed hash detect https://focs.ji.sjtu.edu.cn/git/engr151-24fa/hteam-00/issues/157 This is for the success non-ascii detect success
李衍志523370910113 added the
bug
label 2024-10-17 21:29:22 +08:00
汪睿522370910169 was assigned by 李衍志523370910113 2024-10-17 21:29:27 +08:00
张泊明518370910136 was assigned by 李衍志523370910113 2024-10-17 21:29:32 +08:00
李衍志523370910113 self-assigned this 2024-10-17 21:29:39 +08:00
周赵嘉程521432910016 was assigned by 李衍志523370910113 2024-10-17 21:29:43 +08:00
manuel was assigned by 李衍志523370910113 2024-10-17 21:29:49 +08:00
汪睿522370910169 added the
help wanted
label 2024-10-17 21:37:41 +08:00

For a healtch checker problem, why do you paste the teapot log here?

For a healtch checker problem, why do you paste the teapot log here?

The hash of which file is wrong in the first issue?

The hash of which file is wrong in the first issue?
Owner

The hash of which file is wrong in the first issue?

looks like /home/hydraallen/Desktop/Github/Others/hteam-00/.gitea/workflows/push.yaml (so push.yaml on server)

we probably don't need to output the hash values (this is long and students will feel it's complicated so they won't really read...) so drop that sentence.

> The hash of which file is wrong in the first issue? looks like `/home/hydraallen/Desktop/Github/Others/hteam-00/.gitea/workflows/push.yaml` (so `push.yaml` on server) we probably don't need to output the hash values (this is long and students will feel it's complicated so they won't really read...) so drop that sentence.

So the content of push.yaml?

So the content of `push.yaml`?
Owner

@allen_wr testing file change on push.yaml might not be the easiest test as this file is involved itself in the process. maybe first start with a readonly Readme, then a .gitignore, after that push.yaml and finally a combinations of them. this should cover all cases.

test with no other problem (don't mix with non-aascii chars). only combine test types after confirming they all work "individually".
this should hopefully help tracing the source of the bug

@allen_wr testing file change on `push.yaml` might not be the easiest test as this file is involved itself in the process. maybe first start with a readonly `Readme`, then a `.gitignore`, after that `push.yaml` and finally a combinations of them. this should cover all cases. test with no other problem (don't mix with non-aascii chars). only combine test types after confirming they all work "individually". this should hopefully help tracing the source of the bug

Tried .gitignnore, same issue. Healthcheck outputs difference in hash for .gitignore locally, but no output on gitea issue.

Tried `.gitignnore`, same issue. Healthcheck outputs difference in hash for `.gitignore` locally, but no output on gitea issue.

where is the issue?

where is the issue?
Owner

.gitignore is also kind of involved in the process. what about a readonly readme or any other "neutral" file?

`.gitignore` is also kind of involved in the process. what about a readonly `readme` or any other "neutral" file?

Tried README.md, same issue... The issue is that when files like .gitignore, push.yaml or README.md as just tested are set to be unchangeable, we do sha256 check in healthcheck. When running locally healthcheck or repo-health-check binary file, it can notice that file has been changed and output the msg as shown below:

time=2024-10-18T10:26:12.443+08:00 level=ERROR msg="running git command:" err="exit status 128"
### Repo Size Check Failed:
error running git command: exit status 128
### Repo File Check Failed:
Checksum for /home/hydraallen/Desktop/Github/Others/hteam-00/README.md failed. Expected f12c1087f067461d6bcfcfe912d95386b92e9472e97faae09d71b44df55ef43b, but got d1d0ce3be90f3ae7b3820ef9e0183b8dae98c9e9a0794384e59658703415001e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them.

However, when we tried on gitea, it outputs nothing and healthcheck says everything is fine.

Tried `README.md`, same issue... The issue is that when files like `.gitignore`, `push.yaml` or `README.md` as just tested are set to be unchangeable, we do sha256 check in healthcheck. When running locally `healthcheck` or `repo-health-check` binary file, it can notice that file has been changed and output the msg as shown below: ``` time=2024-10-18T10:26:12.443+08:00 level=ERROR msg="running git command:" err="exit status 128" ### Repo Size Check Failed: error running git command: exit status 128 ### Repo File Check Failed: Checksum for /home/hydraallen/Desktop/Github/Others/hteam-00/README.md failed. Expected f12c1087f067461d6bcfcfe912d95386b92e9472e97faae09d71b44df55ef43b, but got d1d0ce3be90f3ae7b3820ef9e0183b8dae98c9e9a0794384e59658703415001e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them. ``` However, when we tried on gitea, it outputs nothing and healthcheck says everything is fine.

Where is the gitea issue that proves everything happens?

Where is the gitea issue that proves everything happens?

engr151-24fa/hteam-00#169

readme is changed in this commit, healthcheck should fail

https://focs.ji.sjtu.edu.cn/git/engr151-24fa/hteam-00/issues/169 readme is changed in this commit, healthcheck should fail
Owner

add more debug logs before calling the hash check, during, and after. then send the link of the gitea action

add more debug logs before calling the hash check, during, and after. then send the link of the gitea action

first, set and check the debug log file for joj3, not only for teapot.

first, set and check the debug log file for joj3, not only for teapot.
Author
Member

set and done @bomingzh

set and done @bomingzh

so the content of the log?

so the content of the log?
Author
Member

new issue occurs that:

time=2024-10-18T11:29:13.634+08:00 level=DEBUG msg="parser run done" results="[{Score:0
Comment:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clean up or
contact the teaching team.\n}]

but I already has

-repoSize=100

and it seems that healthcheck didn't shut down by this

new issue occurs that: ``` time=2024-10-18T11:29:13.634+08:00 level=DEBUG msg="parser run done" results="[{Score:0 Comment:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clean up or contact the teaching team.\n}] ``` but I already has ``` -repoSize=100 ``` and it seems that healthcheck didn't shut down by this
Author
Member

full content:

time=2024-10-18T11:34:40.100+08:00 level=INFO msg="debug log" path=/home/tt/.cache/joj3/
h3/ex1-debug.log
time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="stages generated" stages="[{Name:hea
lthcheck Executor:{Name:sandbox Cmds:[{Args:[/tmp/repo-health-checker -root=. -whitelist
=.*.out -whitelist=.*.in -whitelist=.gitignore -whitelist=.gitattributes -whitelist=Make
file -whitelist=CMakeLists.txt -whitelist=conf.json -whitelist=.*.cpp -whitelist=.*.c -w
hitelist=.*.h -whitelist=.*.md -whitelist=.*.m -whitelist=.clang-format -whitelist=stder
r -whitelist=stdout releaseCheck=True -repoSize=100 -checkFileNameList=.gitignore,.gitat
tributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml -checkFileSumList=a5b6
3323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9
ca1b7ab44c1d2d05056412bd3e4421645f0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3
957408b43ae723,d1940fabc67a3b5d278f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd] Env:[PA
TH=/usr/bin:/bin:/usr/local/bin] Stdin:0xc0001f4ac0 Stdout:0xc0001f4b00 Stderr:0xc0001f4
b40 CPULimit:10000000000 RealCPULimit:0 ClockLimit:0 MemoryLimit:104857600 StackLimit:0
ProcLimit:50 CPURateLimit:0 CPUSetLimit: CopyIn:map[/tmp/repo-health-checker:{Src:0xc000
2e8890 Content:<nil> FileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false Stre
amOut:false Pipe:false}] CopyInCached:map[] CopyInDir:. CopyOut:[stdout stderr] CopyOutC
ached:[] CopyOutMax:0 CopyOutDir: TTY:false StrictMemoryLimit:false DataSegmentLimit:fal
se AddressSpaceLimit:false}]} Parsers:[{Name:healthcheck Conf:map[comment: score:0]}]} {
Name:Online Judge Executor:{Name:sandbox Cmds:[{Args:[./matlab-joj ./h3/ex1.m] Env:[PATH
=/usr/bin:/bin] Stdin:0xc0001f4e00 Stdout:0xc0001f4bc0 Stderr:0xc0001f4c00 CPULimit:7000
000000 RealCPULimit:0 ClockLimit:14000000000 MemoryLimit:536870912 StackLimit:0 ProcLimi
t:50 CPURateLimit:0 CPUSetLimit: CopyIn:map[matlab-joj:{Src:0xc0002e8920 Content:<nil> F
ileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false StreamOut:false Pipe:false
} matlab_formatter.py:{Src:0xc0002e8940 Content:<nil> FileID:<nil> Name:<nil> Max:<nil>
Symlink:<nil> StreamIn:false StreamOut:false Pipe:false}] CopyInCached:map[] CopyInDir:.
 CopyOut:[stdout stderr] CopyOutCached:[] CopyOutMax:0 CopyOutDir: TTY:false StrictMemor
yLimit:false DataSegmentLimit:false AddressSpaceLimit:false}]} Parsers:[{Name:diff Conf:
map[cases:[map[outputs:[map[answerPath:/home/tt/.config/joj/h3/e1/case0.out fileName:std
out score:100]]]]]} {Name:result-detail Conf:map[showError:true showExitStatus:true show
Files:[stderr] showMemory:false showRunTime:false showTime:false]} {Name:result-status C
onf:map[comment:Online Judge Done\n score:0]}]}]"
time=2024-10-18T11:34:40.100+08:00 level=INFO msg="stage run start"
time=2024-10-18T11:34:40.100+08:00 level=INFO msg="stage start" name=healthcheck
time=2024-10-18T11:34:40.100+08:00 level=INFO msg="executor run start" name=sandbox
time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="executor run start" name=sandbox cmd
s="[{Args:[/tmp/repo-health-checker -root=. -whitelist=.*.out -whitelist=.*.in -whitelis
t=.gitignore -whitelist=.gitattributes -whitelist=Makefile -whitelist=CMakeLists.txt -wh
itelist=conf.json -whitelist=.*.cpp -whitelist=.*.c -whitelist=.*.h -whitelist=.*.md -wh
itelist=.*.m -whitelist=.clang-format -whitelist=stderr -whitelist=stdout releaseCheck=T
rue -repoSize=100 -checkFileNameList=.gitignore,.gitattributes,.gitea/workflows/push.yam
l,.gitea/workflows/release.yaml -checkFileSumList=a5b63323a692d3d8b952442969649b4f823d58
dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f
0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723,d1940fabc67a3b5d278
f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd] Env:[PATH=/usr/bin:/bin:/usr/local/bin] S
tdin:0xc0001f4ac0 Stdout:0xc0001f4b00 Stderr:0xc0001f4b40 CPULimit:10000000000 RealCPULi
mit:0 ClockLimit:0 MemoryLimit:104857600 StackLimit:0 ProcLimit:50 CPURateLimit:0 CPUSet
Limit: CopyIn:map[/tmp/repo-health-checker:{Src:0xc0002e8890 Content:<nil> FileID:<nil>
Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false StreamOut:false Pipe:false}] CopyInCac
hed:map[] CopyInDir:. CopyOut:[stdout stderr] CopyOutCached:[] CopyOutMax:0 CopyOutDir:
TTY:false StrictMemoryLimit:false DataSegmentLimit:false AddressSpaceLimit:false}]"
time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="create exec client" server=172.17.0.
1:5051
time=2024-10-18T11:34:40.165+08:00 level=DEBUG msg="executor run done" results="[{Status
:Accepted ExitStatus:0 Error: Time:303000 RunTime:13077219 Memory:11.0 MiB Files:map[std
err:len:0 stdout:len:106] FileIDs:map[] FileError:[]}]"
time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="executor run done" result.Files="map
[stderr: stdout:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clea
n up or contact the teaching team.\n]"
time=2024-10-18T11:34:40.166+08:00 level=INFO msg="parser run start" name=healthcheck
time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="parser run start" name=healthcheck c
onf="map[comment: score:0]"
time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="parser run done" results="[{Score:0
Comment:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clean up or
contact the teaching team.\n}]"
time=2024-10-18T11:34:40.166+08:00 level=ERROR msg="parser force quit" name=healthcheck
time=2024-10-18T11:34:40.166+08:00 level=INFO msg="output result start" path=/tmp/joj3_r
esult.json
time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="output result start" path=/tmp/joj3_
result.json results="[{Name:healthcheck Results:[{Score:0 Comment:### Repo Size Check Fa
iled:\nRepository larger than 2.0 MiB. Please clean up or contact the teaching team.\n}]
 ForceQuit:true}]"
time=2024-10-18T11:34:40.166+08:00 level=INFO msg="stage cleanup start"
time=2024-10-18T11:34:41.243+08:00 level=INFO msg="joint-teapot joj3-create-result-issue
" output="2024-10-18 11:34:40.795 | INFO     | joint_teapot.app:joj3_create_result_issue
:410 - debug log to file: /home/tt/.cache/joj3/h3/ex1-teapot-debug.log"
full content: ``` time=2024-10-18T11:34:40.100+08:00 level=INFO msg="debug log" path=/home/tt/.cache/joj3/ h3/ex1-debug.log time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="stages generated" stages="[{Name:hea lthcheck Executor:{Name:sandbox Cmds:[{Args:[/tmp/repo-health-checker -root=. -whitelist =.*.out -whitelist=.*.in -whitelist=.gitignore -whitelist=.gitattributes -whitelist=Make file -whitelist=CMakeLists.txt -whitelist=conf.json -whitelist=.*.cpp -whitelist=.*.c -w hitelist=.*.h -whitelist=.*.md -whitelist=.*.m -whitelist=.clang-format -whitelist=stder r -whitelist=stdout releaseCheck=True -repoSize=100 -checkFileNameList=.gitignore,.gitat tributes,.gitea/workflows/push.yaml,.gitea/workflows/release.yaml -checkFileSumList=a5b6 3323a692d3d8b952442969649b4f823d58dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9 ca1b7ab44c1d2d05056412bd3e4421645f0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3 957408b43ae723,d1940fabc67a3b5d278f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd] Env:[PA TH=/usr/bin:/bin:/usr/local/bin] Stdin:0xc0001f4ac0 Stdout:0xc0001f4b00 Stderr:0xc0001f4 b40 CPULimit:10000000000 RealCPULimit:0 ClockLimit:0 MemoryLimit:104857600 StackLimit:0 ProcLimit:50 CPURateLimit:0 CPUSetLimit: CopyIn:map[/tmp/repo-health-checker:{Src:0xc000 2e8890 Content:<nil> FileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false Stre amOut:false Pipe:false}] CopyInCached:map[] CopyInDir:. CopyOut:[stdout stderr] CopyOutC ached:[] CopyOutMax:0 CopyOutDir: TTY:false StrictMemoryLimit:false DataSegmentLimit:fal se AddressSpaceLimit:false}]} Parsers:[{Name:healthcheck Conf:map[comment: score:0]}]} { Name:Online Judge Executor:{Name:sandbox Cmds:[{Args:[./matlab-joj ./h3/ex1.m] Env:[PATH =/usr/bin:/bin] Stdin:0xc0001f4e00 Stdout:0xc0001f4bc0 Stderr:0xc0001f4c00 CPULimit:7000 000000 RealCPULimit:0 ClockLimit:14000000000 MemoryLimit:536870912 StackLimit:0 ProcLimi t:50 CPURateLimit:0 CPUSetLimit: CopyIn:map[matlab-joj:{Src:0xc0002e8920 Content:<nil> F ileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false StreamOut:false Pipe:false } matlab_formatter.py:{Src:0xc0002e8940 Content:<nil> FileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false StreamOut:false Pipe:false}] CopyInCached:map[] CopyInDir:. CopyOut:[stdout stderr] CopyOutCached:[] CopyOutMax:0 CopyOutDir: TTY:false StrictMemor yLimit:false DataSegmentLimit:false AddressSpaceLimit:false}]} Parsers:[{Name:diff Conf: map[cases:[map[outputs:[map[answerPath:/home/tt/.config/joj/h3/e1/case0.out fileName:std out score:100]]]]]} {Name:result-detail Conf:map[showError:true showExitStatus:true show Files:[stderr] showMemory:false showRunTime:false showTime:false]} {Name:result-status C onf:map[comment:Online Judge Done\n score:0]}]}]" time=2024-10-18T11:34:40.100+08:00 level=INFO msg="stage run start" time=2024-10-18T11:34:40.100+08:00 level=INFO msg="stage start" name=healthcheck time=2024-10-18T11:34:40.100+08:00 level=INFO msg="executor run start" name=sandbox time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="executor run start" name=sandbox cmd s="[{Args:[/tmp/repo-health-checker -root=. -whitelist=.*.out -whitelist=.*.in -whitelis t=.gitignore -whitelist=.gitattributes -whitelist=Makefile -whitelist=CMakeLists.txt -wh itelist=conf.json -whitelist=.*.cpp -whitelist=.*.c -whitelist=.*.h -whitelist=.*.md -wh itelist=.*.m -whitelist=.clang-format -whitelist=stderr -whitelist=stdout releaseCheck=T rue -repoSize=100 -checkFileNameList=.gitignore,.gitattributes,.gitea/workflows/push.yam l,.gitea/workflows/release.yaml -checkFileSumList=a5b63323a692d3d8b952442969649b4f823d58 dae26429494f613df160710dfc,b1bbad25b830db0a77b15a033f9ca1b7ab44c1d2d05056412bd3e4421645f 0bf,8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723,d1940fabc67a3b5d278 f724e32a349f2b0d49eace900fc6cbd93ce9433c703cd] Env:[PATH=/usr/bin:/bin:/usr/local/bin] S tdin:0xc0001f4ac0 Stdout:0xc0001f4b00 Stderr:0xc0001f4b40 CPULimit:10000000000 RealCPULi mit:0 ClockLimit:0 MemoryLimit:104857600 StackLimit:0 ProcLimit:50 CPURateLimit:0 CPUSet Limit: CopyIn:map[/tmp/repo-health-checker:{Src:0xc0002e8890 Content:<nil> FileID:<nil> Name:<nil> Max:<nil> Symlink:<nil> StreamIn:false StreamOut:false Pipe:false}] CopyInCac hed:map[] CopyInDir:. CopyOut:[stdout stderr] CopyOutCached:[] CopyOutMax:0 CopyOutDir: TTY:false StrictMemoryLimit:false DataSegmentLimit:false AddressSpaceLimit:false}]" time=2024-10-18T11:34:40.100+08:00 level=DEBUG msg="create exec client" server=172.17.0. 1:5051 time=2024-10-18T11:34:40.165+08:00 level=DEBUG msg="executor run done" results="[{Status :Accepted ExitStatus:0 Error: Time:303000 RunTime:13077219 Memory:11.0 MiB Files:map[std err:len:0 stdout:len:106] FileIDs:map[] FileError:[]}]" time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="executor run done" result.Files="map [stderr: stdout:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clea n up or contact the teaching team.\n]" time=2024-10-18T11:34:40.166+08:00 level=INFO msg="parser run start" name=healthcheck time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="parser run start" name=healthcheck c onf="map[comment: score:0]" time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="parser run done" results="[{Score:0 Comment:### Repo Size Check Failed:\nRepository larger than 2.0 MiB. Please clean up or contact the teaching team.\n}]" time=2024-10-18T11:34:40.166+08:00 level=ERROR msg="parser force quit" name=healthcheck time=2024-10-18T11:34:40.166+08:00 level=INFO msg="output result start" path=/tmp/joj3_r esult.json time=2024-10-18T11:34:40.166+08:00 level=DEBUG msg="output result start" path=/tmp/joj3_ result.json results="[{Name:healthcheck Results:[{Score:0 Comment:### Repo Size Check Fa iled:\nRepository larger than 2.0 MiB. Please clean up or contact the teaching team.\n}] ForceQuit:true}]" time=2024-10-18T11:34:40.166+08:00 level=INFO msg="stage cleanup start" time=2024-10-18T11:34:41.243+08:00 level=INFO msg="joint-teapot joj3-create-result-issue " output="2024-10-18 11:34:40.795 | INFO | joint_teapot.app:joj3_create_result_issue :410 - debug log to file: /home/tt/.cache/joj3/h3/ex1-teapot-debug.log" ```

need to add more debug logs inside healthcheck, and also log the version of healthcheck

need to add more debug logs inside healthcheck, and also log the version of healthcheck
Author
Member

how to achieve?

how to achieve?

add slog.Debug in pkg/healthcheck/xxx.go

add slog.Debug in pkg/healthcheck/xxx.go

which server are you using @jon-lee I didn't log to the server for a long time

which server are you using @jon-lee I didn't log to the server for a long time
Author
Member

@zzjc123 tt@111.186.58.48

@zzjc123 `tt@111.186.58.48`

engr151-24fa/hteam-00#169

readme is changed in this commit, healthcheck should fail

it looks good now @allen_wr engr151-24fa/hteam-00#170

> https://focs.ji.sjtu.edu.cn/git/engr151-24fa/hteam-00/issues/169 > > readme is changed in this commit, healthcheck should fail it looks good now @allen_wr https://focs.ji.sjtu.edu.cn/git/engr151-24fa/hteam-00/issues/170

noticed that, thank!

noticed that, thank!
Owner

Checksum for .gitea/workflows/push.yaml failed. Expected 8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723, but got 4f4091b5e83442d46936959fefde7b657740cd76f4f3ade217726d90091d386e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them.

adjust for a more simple message that freshmen can understand, eg.
Some files were altered .gitea/workflows/push.yaml. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them. (or any other message)

basically remove the word checksum and the "values" of the checksums.

`Checksum for .gitea/workflows/push.yaml failed. Expected 8d1229900c6fc6711b5cc141d1ab5ea7f5b7b7a4b921d9cfa3957408b43ae723, but got 4f4091b5e83442d46936959fefde7b657740cd76f4f3ade217726d90091d386e. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them.` adjust for a more simple message that freshmen can understand, eg. `Some files were altered .gitea/workflows/push.yaml. Please revert your changes or contact the teaching team if you have a valid reason for adjusting them.` (or any other message) basically remove the word `checksum` and the "values" of the checksums.
Sign in to join this conversation.
No description provided.