Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment fetchArtifact

work/artifact::fetchArtifact


Parameters

↳ var parallel: u32 = 4

Inputs

⇥ filesystem: Block<FileSystem> (fs/filesystem::FileSystem)
⇥ name: Block<string>
⇥ path: Block<string>
⇥ run: Block<string>

Outputs

↦ completed: Block<void>
↦ error: Block<string>
↦ failed: Block<void>
↦ finished: Block<void>


Fetch a run artifact of api.melodium.tech.

The files of the artifact name of the run run (its identifier) are written under path of filesystem, at their paths in the artifact, directories being created as needed, at most parallel at once. Each file is downloaded with resumption after cuts, and checked against the SHA-256 api.melodium.tech recorded: a file that differs is removed, and fails the fetch.

Once every file is written and checked, completed is emitted. If the artifact cannot be read (it does not exist, is not readable by the run, expired or was deleted), or a file cannot be downloaded, written or differs, failed is emitted and error gives the reason. finished is emitted in every case.

Artifacts are only fetched by programs run by api.melodium.tech, from runs of their organization or public artifacts.