Repository navigation
Store reports on a configurable filesystem disk - #699
Closed
jure-knezovic wants to merge 1 commit into
Closed
jure-knezovic wants to merge 1 commit into
jure-knezovic wants to merge 1 commit into
Conversation
Reports, their chunks and their pages were written with the File facade to a hard-coded storage_path(). Where the filesystem is not shared between processes or does not survive a deploy (containers, serverless platforms, autoscaled instances), the report the "Generate" request wrote is not there for the redirect that follows, so the show page answers 404, and the chunks the queue worker writes are never seen by the web process. A new `reports.disk` config key names a disk from config/filesystems.php to store the reports on. Unset, a local disk rooted at storage/statamic/seopro/reports keeps the current layout, so existing reports and the existing tests stay as they are. The report's folder and path methods are relative to that disk now; `pagesFolder()` is new, `preparePath()` is gone (a disk creates directories on write). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
|
Thanks for the pull request! However, I think we should make it possible to store reports in a database, like you can with other Statamic things, rather than making the filesystem configurable. With that said, I'm going to close this PR. I'd happily accept a PR that makes reports storable in the database. 🙂 |
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.
Reports, their chunks and their pages were written with the File facade to a hard-coded storage_path(). Where the filesystem is not shared between processes or does not survive a deploy (containers, serverless platforms, autoscaled instances), the report the "Generate" request wrote is not there for the redirect that follows, so the show page answers 404, and the chunks the queue worker writes are never seen by the web process.
A new
reports.diskconfig key names a disk from config/filesystems.php to store the reports on. Unset, a local disk rooted at storage/statamic/seopro/reports keeps the current layout, so existing reports and the existing tests stay as they are. The report's folder and path methods are relative to that disk now;pagesFolder()is new,preparePath()is gone (a disk creates directories on write).Closes #698