Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to export a task to a self-contained tar file #50

Open
veluca93 opened this issue May 1, 2022 · 7 comments
Open

Command to export a task to a self-contained tar file #50

veluca93 opened this issue May 1, 2022 · 7 comments

Comments

@veluca93
Copy link
Collaborator

veluca93 commented May 1, 2022

No description provided.

@edomora97
Copy link
Collaborator

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

@veluca93
Copy link
Collaborator Author

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)

@edomora97
Copy link
Collaborator

I guess also task.yaml, the attachments and the "external" symlinks resolved.

@cairomassimo
Copy link

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-maker in the extracted tar, 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 tar a second time in the same directory will generate byte-to-byte exactly the same file.

@veluca93
Copy link
Collaborator Author

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.

@cairomassimo
Copy link

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-solution to generate the statements, and
  • task-maker-tools task-info to generate the metadata.

We will need LaTeX installed on the UI server, but I'm assuming that won't be an issue.

@cairomassimo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants