Repository navigation
#240 - Stream the log file download, bound the uploaded file names, detach the ended process executions - #241
Merged
Merged
Conversation
…etach the ended process executions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
Fixes #240.
ProcessExecutionCrudController::downloadLogFile()streams the file with aBinaryFileResponseinstead of loading it withfile_get_contents(). A log file bigger than the memory limit can now be downloaded, and range requests are supported. TheContent-Dispositionheader is built bysetContentDisposition(), so the file name is no longer quoted when it does not need to be. A missing or unreadable file still answers 404.UploadedFileManager::getSafeExtension()/getSafeName():uuid.csv; no dot when nothing is left). A long extension made the writing fail (500, the exception message containing the path).<date>_<uniqid>_<name>stays under 255 bytes. A long name made the writing fail, caught by the value resolver: 422 "process code missing".ProcessEventSubscriberdetaches the process execution from the entity manager once it has ended, after theProcessExecutionEndedEvent(also when a listener fails). It uses the newProcessExecutionManager::detachLastProcessExecution()andProcessExecutionRepository::detach()(no-op when the entity is not managed or the entity manager is closed). Without a reset of the services (processes executed in a loop, tests, FrankenPHP worker mode), every ended execution stayed in the identity map.getLastProcessExecution()still returns it, e.g. for its id in the HTTP API error message.Requirements
Breaking changes
None. A file uploaded with the launch form keeps a different extension only when its extension had characters other than letters and digits, or more than 16 of them.
🤖 Generated with Claude Code