-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow retrieval of files for Custom Tasks #234
Comments
Not sure what this means? Task files have been shown and downloadable from the UI since we add them to the UI. |
@rocketeerbkw has this changed since July of 2022? If so, can you point me at documentation on how to take a file created by a custom task and add it to the UI? Thanks! |
What you originally asked is how to retrieve a file from a task, not add a file to a task |
It is possible to upload a file to a task via the API. The CLI offers a way to upload files to a task. You just need to know some information about the task. All task pods have a variable named |
@shreddedbacon , yes, you're right. For context, I think this was for a database dump task; we wanted the devs to be able to dump the database, then download it from the UI. Discussion should be visible on AIOSD-7263. The discussion there says that it's not currently possible to retrieve task files from the CLI. Does that mean it'd be possible via GraphQL? Thanks! |
Yes, well retrieving the download link for the file(s) would be possible. |
Oh, that makes sense. If the CLI could do it, that'd be even better, but that's better than nothing :) . |
It can probably do this yes, when time permits to add the functionality I guess. |
No, tasks have always been able to have files attached and downloadable from the UI.
We don't have documentation for this. The easiest option, as Ben suggested, is to use the lagoon cli
This is one valid query, there are other ways of course: query ($taskId: Int!) {
taskById(
id: $taskId
) {
id
name
files {
id
filename
download
}
}
} If you wanted to use the lagoon-cli to get the download link you could do something like the following:
|
Oh, nice! Didn't know about lagoon raw. Thanks! |
Is your feature request related to a problem? Please describe.
When I do a database dump on a non-drush site (via a Custom Task), there's no straightforward way to retrieve the file from the task.
Describe the solution you'd like
Ben Jackson's suggestion for solving this problem (not an approval from him, just a thought) was something along the lines of:
lagoon get task-file --task-id <id>
Describe alternatives you've considered
Dumping the files directly into the backups list.
EDIT: Changed some wording and references to better reflect that tasks are different to backups.
The text was updated successfully, but these errors were encountered: