Remove CLI options, parse commit msg to decide which conf file to read #14
Labels
No Label
bug
component
executor
component
framework
component
parser
component
UI
duplicate
enhancement
help wanted
invalid
priority
p0
priority
p1
priority
p2
priority
p3
question
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JOJ/JOJ3#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
e.g. with commit msg contains
joj. h8
,joj3
will readh8.toml
and run.based on "patched" conventional commits:
feat, fix, refactor, perf, test, build, revert
joj, grading
doc, style, ci, chores
note: whether or not to run CQ also depends on the course requirements (eg. no need for latex)
Corner cases: PR appear on drone with long complex messages featuring CN char (repo health check let it pass). eg. https://focs.ji.sjtu.edu.cn:2222/engr151-23fa/hteam-21/937
note: if only relying on commit message, then we need a very "strict" commit message structure and early reject anything failing
\to
at repo health check (#16)suggestion:
pcc: assignment description
wherepcc
means "patched conventional commit` assignment is the assignment name as defined in the toml config file used for that repo , and description is either a text or numbers for oj exercises to testeg.
feat. hw3 meam leak in ex3
orjoj. h4 2 5
downside:
workaround: in the prev implementation we would discover the task (eg.
h8
orp1m1
) and jump inside the corresponding folder (h8
) if it existed (so no jump forp1m1
).detection strategy used in 23fa. fix commit format especially for joj submission. for other commits only run repo health + code quality
\to
correctness makes sense only when a task is ready...Assume commit message
joj: h8 3 5
,joj: h8
, orjoj: p1m1
assignment detection process:
A
afterjoj:
and take it as the taskA
to check on jojA
exists, jump into it and expect to find the code thereA
exists, check if there is ansrc
dir. if yes jump there and find the codeA
norsrc
exist then stay where we are, the code must be herespecial case of PR:
joj
commit and use the assignment found there.git
is deleted (as in 23fa) this check should be run very earlywe may need 3 config files for each type:
based on prev courses:
i think our modular design should make it easy to load any combination of plugin we want. (this is how i made it work last fall)
Not sure about current hierachy. What's the path for different config file or there is a rule to name the config file for different usage?
all the config files are in the same dir but have different names
What's current pattern to name the config?
https://focs.ji.sjtu.edu.cn:2222/FOCS-dev/JOJ3/407/1/4
Just
conf.toml
by default if nothing is matched in the test cases.It would be bad for students? If we don't provide an error and they made a bad commit msg they may think everything is working "fine"
It depends on the requirements of the teaching team.
So what should I do? Can I just give students some output msg if commit msg fail to match any pattern? ( like joj: bad msg and I just use the conf.toml and output some msg like
error: bad pattern for oj you need to follow pattern joj: h[0-9]+
?what do you mean? committing with "h8" instead of "p2" for instance? if this is the case then "most likely" they should realise output is not as expected?
I mean student may not understand what's going on if their msg is
joj: some random words
They may think they commit with correct pattern if we don't give they any error.ideally (maybe to be fully implemented later) we only want to allow conventional commit messages with added keyword
joj
. pattern should be:joj: assignment subassignment
where assignment is defined by TT (eg.h2
in my courses but could behw2
orhomework-2
in other courses). if JOJ config file has no entry for the assignment then things should "fail" in some way (eg. "report no such assignment").\to
ifsubassignment
is missing then it means "check all subassignemnts" (joj: h2
means check the whole h2, whilejoj: h2 4 6
means only check exercises 4 and 6) if an assignment of subassignment doesn't exist then stop work and say that it failed\to
this should be caught early so that we don't do any useless work (eg. try to compile). maybe part of repo check when parsing commit message (we detect whether it is meaningful or not, if not no need to go any further...)So shall we give they some hint now if this happen?
Current strategy is just run healthcheck only if following issue happens.
healthcheck should be run on any commit? then "prepare the way" for JOJ. fialed healthcheck should prevent JOJ running (otherwise nobody will care... until they get their grade, and they will complain that they didn't see any problem reported about their submission)
Already implemented through force quit.
We may need jobtype flag in the config for each hw s.t. we know which stages to perform after parsing the config. At this stage I can only parse based on the name of stage which is not a wise choice I think.
73f1688e41/cmd/joj3/conf.go (L76-L117)
Done by meta conf.