docs: update new architecture
All checks were successful
submodules sync / sync (push) Successful in 38s
build / build (push) Successful in 1m31s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-10-28 00:17:04 -04:00
parent 2a58aec314
commit 6f3ba1500a
GPG Key ID: D47306D7062CDA9D

View File

@ -77,9 +77,9 @@ pre-commit installed at .git/hooks/pre-commit
## How does it work?
These steps are executed in runner-images. We use `sudo -u tt` to elevate the permission and run `joj3` and `joint-teapot`. All the secret files should be stored in the host machine with user `tt` and mounted into the runner (e.g. `/home/tt/.config`). Since the runner uses user `student`, we can keep the data safe.
These steps are executed in runner-images. We use `sudo -u tt` to elevate the permission and run `joj3`. All the secret files should be stored in the host machine with user `tt` and mounted into the runner (e.g. `/home/tt/.config`). Since the runner uses user `student`, we can keep the data safe. A single call to `joj3` executable will run 2 parts:
1. Run JOJ3
1. Run JOJ3 stages
1. Parse the message.
- It will use the git commit message from `HEAD`. The message should meet the [Conventional Commits specification](https://www.conventionalcommits.org/). We use `scope` and `description` here.
- If `-tag` is specified, then it should equal to the scope of the message, or JOJ3 will not run.
@ -91,17 +91,16 @@ These steps are executed in runner-images. We use `sudo -u tt` to elevate the pe
- Every stage needs to have an unique `name`, which means if two stages have the same name, only the first one will be added.
4. Run stages.
- By default, all the stages will run sequentially.
- Each stage contains a executor and a parser. Executor (currently only sandbox) executes the command and parser parses the output generated by the executor.
- The parser can return a force quit, which means all the stages after it will be skipped.
- Each stage contains a executor and multiple parsers. The executor (currently only sandbox) executes the command and parsers parse the output generated by the executor. The parsers in one stage will run sequentially, and all the output will be aggregated (scores being summed up and comment being concatenated).
- The parser can return a force quit, which means all the stages after it will be skipped, but the remaining parsers in the current stage will run.
5. Generate results.
- Once the running of stages is done, it will generate a result file where the path is specified in the configuration file.
2. Run Joint-Teapot.
1. Generally speaking, it reads the JOJ3 results file and output results on Gitea.
- We use a wrapper script `joj3-teapot` to limit the commands can be run in the original `joint-teapot` for safety.
- Currently, the environment file path and joj3 result file path are hardcoded, as `/home/tt/.config/teapot/teapot.env` and `/tmp/joj3_result.json`, respectively.
2. With `joint-teapot joj3-scoreboard`, it will update the scoreboard file in grading repo.
3. With `joint-teapot joj3-failed-table`, it will update the failed table file in grading repo.
4. With `joint-teapot joj3-create-result-issue`, it create an issue in the submitter's repo to show the results.
2. With `joint-teapot joj3-all`, it will do the following things:
1. Create/Edit an issue in the submitter's repo to show the results.
2. Update the scoreboard file in grading repo.
3. Update the failed table file in grading repo.
## Components