Repository navigation
Add a submission:download Artisan command - #4308
Merged
williamjallen merged 1 commit intoDec 3, 2026
Merged
Conversation
williamjallen
force-pushed
the
submission-download-command
branch
from
December 2, 2026 19:48
a0ba3e9 to
05abf10
Compare
Adds `php artisan submission:download {id}`, which writes out a submitted file exactly as CDash received it, so an admin can look at what a client actually sent, such as a file that failed to parse.
By default the file goes to stdout, so it can be piped like `cat`:
```
$ php artisan submission:download 01a23476-e1b4-7dae-9743-f0345ce7d6ce | xmllint --format - | less
$ php artisan submission:download 01a23476-e1b6-7333-9c7c-1db817a4e2f5 | tar tv
```
With `--output`, it writes a file instead. A directory gets the file under the submission's ID, followed by the client's filename for data files:
```
$ php artisan submission:download 01a23476-e1b4-7dae-9743-f0345ce7d6ce --output=.
Wrote ./01a23476-e1b4-7dae-9743-f0345ce7d6ce.xml (812 KB)
```
Details:
- Messages and errors go to stderr, so stdout carries only the file. A failed write, such as to a full disk, exits 1. A reader that stops early, such as `head`, ends the command quietly, as with `cat`.
- A binary file isn't written to a terminal, since it could leave the terminal unusable. Redirect the output or use `--output` instead.
- An existing file isn't overwritten unless `--force` is given, and a device or named pipe is never replaced. The file is created readable by its owner only, since submissions can contain secrets. It's written beside the target and renamed into place when complete, so a failure never leaves a partial file.
- The client's filename comes from the uploader, so only its base name is used, with unsafe characters replaced.
- The file is looked up at the path recorded for the submission. If it isn't there, or storage can't be read, the command says so and exits 1.
williamjallen
force-pushed
the
submission-download-command
branch
from
December 3, 2026 13:41
05abf10 to
9b20b6a
Compare
zackgalbreath
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
php artisan submission:download {id}, which writes out a submitted file exactly as CDash received it, so an admin can look at what a client actually sent, such as a file that failed to parse.By default the file goes to stdout, so it can be piped like
cat:With
--output, it writes a file instead. A directory gets the file under the submission's ID, followed by the client's filename for data files:Details:
head, ends the command quietly, as withcat.--outputinstead.--forceis given, and a device or named pipe is never replaced. The file is created readable by its owner only, since submissions can contain secrets. It's written beside the target and renamed into place when complete, so a failure never leaves a partial file.