- Sphere Engine overview
- Compilers
- Overview
- API
- Widgets
- Resources
- Problems
- Overview
- API
- Widgets
- Handbook
- Resources
- Containers
- Overview
- Glossary
- API
- Workspaces
- Handbook
- Resources
- RESOURCES
- Programming languages
- Modules comparison
- Webhooks
- Infrastructure management
- API changelog
- FAQ
As discussed in the submission results document, during the submission execution, some feedback is produced and stored. Most of it is strictly defined, yet there is one dedicated stream designed to keep auxiliary files selected by the Content Manager.
For each scenario, a project configuration allows defining
which directories should be kept after the submission execution of this scenario. This is defined in the
root.scenarios.scenarioName.auxdata
key of the configuration JSON file.
The auxdata configuration field is a key: value collection compatible with the following:
- both
keyandvalueare of the typestring, - the
keyis a string that is valid as a filename in Linux operating systems, - the
valueis an absolute path, or a relative path to some directory in the filesystem,- if a relative path is given, it is assumed to be relative to the
$SE_PATH_WORKSPACEdirectory (usually/home/user/workspace).
- if a relative path is given, it is assumed to be relative to the
After the submission execution of the scenario the following steps are performed:
- a single compressed archive
auxdata.tar.gzwith all specified resources will be created,- the archive is of the
gziptype,
- the archive is of the
- for each
keya directory of the same name is created in theauxdata.tar.gzarchive, - for the
valuecorresponding with thekey, the content of the directory pointed byvalueis copied into the directory pointed bykeyin theauxdata.tar.gzarchive, - if the directory pointed by
valueis missing, the wholekey: valuepair is omitted,- this is not considered an error,
- an empty directory of the name
keywill not be created in theauxdata.tar.gzarchive,
- the copying process does not follow symbolic links in the
copied directories,
- this means that files and directories pointed by symbolic link will not be present in the
auxdata.tar.gzarchive.
- this means that files and directories pointed by symbolic link will not be present in the
Example
Now, let's summarize this by analyzing a simple example.
config.json file:
{
(...)
"auxdata": {
"custom_dir1": "d1",
"custom_dir2": "d2",
"custom_dir3": "/tmp/xyz"
}
(...)
}
By this part of a configuration file it is expected that after submission execution of the scenario, there are three directories that should be preserved:
- directory
d1in the$SE_PATH_WORKSPACE, so usually/home/user/workspace/d1, - directory
d2in the$SE_PATH_WORKSPACE, so usually/home/user/workspace/d2, - directory
/tmp/xyz.
Based on this, a compressed archive auxdata.tar.gz with the content specified be auxdata configuration field
will be created. Assuming all specified directories exist, the structure of the archive is as follows:
.
├── custom_dir1
│ ├── ...
│ └── ...
├── custom_dir2
│ ├── ...
│ └── ...
└── custom_dir3
│ ...
└── ...
For example the content of auxdata.tar.gz archive can look like this:
.
├── custom_dir1
│ ├── file.txt
│ └── .hidden_file
├── custom_dir2
│ ├── file.txt
│ └── subdirectory
│ ├── file.txt
│ └── .hidden_file
└── custom_dir3
└── file.txt
Finally, the auxdata.tar.gz archive is stored along with other submission execution of the scenario results. It can be
later downloaded by the
GET /submissions/:id/:stream Containers API
method call with stream=auxdata.