Command to export a task to a self-contained tar file
Can you explain what do you mean more precisely? I think I know where this can be useful, but I'd like to know what files should be included in this package.
cc: @cairomassimo
Basically, "whatever is in the list of inputs of the DAG" is at least a reasonable first approximation (assuming those files are sufficient for rebuilding the DAG)
I guess also task.yaml, the attachments and the "external" symlinks resolved.
We are giving up on running problems "from the Git source" on the UI server. (We can still have a pipeline to run a problem from a given Git commit, just it won't be on the UI server.) So, we need a new format to represent a problem on the server. The simplest option is a tar file containing the problem directory, with these requirements:
- it's self-contained (i.e., no symlink pointing outside the folder),
- it's possible to run
task-makerin the extractedtar, with the same effect as running it from the source directory, - no inputs and outputs in the tar (there's the cache for that),
- (nice to have) after extracting the
tar, all the files pointed-to from the task metadata are already in place: statement, attachments,task-info.json(this avoids the need of running another command later on the server to generate said files), - (nice to have) deterministic, i.e., creating the
tara second time in the same directory will generate byte-to-byte exactly the same file.
My 2c: generated files such as statements should not be in that bundle -- so that if the generation process improves, one can re-trigger it without actually importing again the task and/or creating a new version.
generated files such as statements should not be in that bundle
Ok, no problem with that. On the server we can run:
task-maker non-existent-solutionto generate the statements, andtask-maker-tools task-infoto generate the metadata.
We will need LaTeX installed on the UI server, but I'm assuming that won't be an issue.
BTW, if we don't want to generate any extra file, then a command like task-maker-tools ls-files, which simply lists the files used by task-maker, would be enough. We can resolve external symlinks and tar the files after that.