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
Starting the execution of a flow via API produces large temporary files that are not automatically deleted! #3335
Comments
This only happens in Windows and seems to be an issue with MicronautHttpData that cannot delete the temporary file used for file upload. When a file is uploaded in a multipart request (used to trigger a flow with a FILE input), Micronaut will first transfer the file to disk, then call our endpoint, and at the end delete the file after we transfer it to our internal storage. |
I created an issue upstream: micronaut-projects/micronaut-core#10678 |
@loicmathieu looks like micronaut is not going to do much about it?! As I workaround (or maybe even standard way). Can i pass the input information in the API call to |
@M-E-Rademaker you can pass all kind of inputs, file being one of those. |
i think there was a misunderstanding. I wasnt referring to the input type in a YAML but to the way information is send via API to the API endpoint. In the documentation for the end However, this is the argument that is causing the issue. I tried using the "data" arguement or the "json" argument (arguments of pythons request.post() method). However, these fail because the endpoint does not seem to be able to do anything with that info. Example from https://requests.readthedocs.io/en/latest/user/quickstart/ that uses data UPDATE |
This is a doc issue, it accepts multiple form-data parts, each part should match the name of the input except when the input is a file the part must be called files and include the filename via the filename attribute. For example, this curl will trigger a flow with 2 inputs:
|
See the documentation here: https://kestra.io/docs/workflow-components/execution#execute-a-flow-via-an-api-call |
ok i tried but no matter how i do it. I have to use the files argument when using requests. Maybe the issue is the way requests handles this particular argument. Apparently it creates this temp file. Why it cannot be deleted and why it is so large. I dont understand... |
Describe the issue
The issue is decribed in this thread on slack.
If you need additional information please let me know!
Environment
The text was updated successfully, but these errors were encountered: