Adding possibility for jobs not linked to a task or course#1110
Adding possibility for jobs not linked to a task or course#1110AlexandreDoneux wants to merge 9 commits into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 12 |
| Duplication | 2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
anthonygego
left a comment
There was a problem hiding this comment.
This PR is not very clean. You should read your diff before submitting it.
Globally it seems good, but I'd rather rewrite the client.new_job method so that it becomes agnostic of whether we are launching a task or not. I'd modify this so that submission_manager` unpacks the task data and call this method with the appropriate arguments, and that a plugin or another component would call the this method using its own environment definition and inputdata.
This way the signature would be less confusing and the code would not need to handle different cases with default code.
Jobs that are not related to a task/course are not submissions and should not be placed in the submission manager. The Call to Client.new_job() and ClientSync.new_job() can be directly made where it is needed.
|
Sorry for the errors that slipped in the code. I worked on another branch on multiple features at once before importing the code I thought was relevant. It is clearly not the most efficient/foolproof way of working. I fixed those and ran a courseless/taskless job by calling a synchronous job. However this is not yet possible in the current state of INGInious. Do you have in mind a way for you or other reviewers to check the feature is working as expected. I also had another question :
|
It's probably safer to default to an empty dictionary and maybe enforce it. The |
|
Well well well, I realize by testing the code that empty There is a choice to be made here:
In both cases it's worth adding docs under a Developers documentation/Extensions/Taskless jobs section. This should specify the valid paths for the entrypoints and how to use the client. |
This PR modifies code to be able to handle container jobs that are not linked to a course and task. Meaning you don't need to provide a course and task id.
This is not yet a fully implemented feature and will be followed by other PRs that allow unique jobs to be used for a reworked jplag plugin.