sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Centralize file storage configuration

Open mattrobenolt opened this issue 10 years ago • 10 comments

We should have one global option, something like system.file-dir. This directory will act as a parent directory for any other subsystem that needs to store data on the filesystem.

Off the top of my head, the two options we now have are for file uploads, which is SENTRY_FILESTORE_DIR and what @mitsuhiko just added for dsyms, dsym.cache-path.

We should introduce a new option, and these systems can then just do path.join(options.get('system.file-dir'), 'dsym-cache')), etc.

This way there's only one option a user has to configure, and we can easily add more storages without them needing to configure yet another location.

mattrobenolt avatar Mar 08 '16 23:03 mattrobenolt

I just want to leave my opinion on record here that I think it should still be possible to override the paths. Eg. The dsym.cache-path if not set is a subfolder of system.file-dir but if configured, overrides the default.

mitsuhiko avatar Mar 08 '16 23:03 mitsuhiko

What's the value in being able to do that? In what scenario would someone want to have storages in entirely different locations without sharing the parent? It's easy to mount drives to a subdirectory.

I can't think of any large system that requires configuring multiple directories like that.

I'm open to this, I'm just not sure there's value in adding that complexity.

mattrobenolt avatar Mar 08 '16 23:03 mattrobenolt

Storage needs to be capable of living in diff roots. Join is fine as it allows absolute paths. 

dcramer avatar Mar 08 '16 23:03 dcramer

Storage needs to be capable of living in diff roots. Join is fine as it allows absolute paths.

This is what I'm asking about. :) What would be the reason someone would want that? This just makes it now N configuration options, as opposed to just 1. One for each different storage system.

mattrobenolt avatar Mar 08 '16 23:03 mattrobenolt

Because I might want file store to live in temp or I might already have mounts setup a specific way. 

dcramer avatar Mar 08 '16 23:03 dcramer

I know you could have a mount under the path or have symlinks, but i just generally prefer being able to point things to completely different locations.

mitsuhiko avatar Mar 08 '16 23:03 mitsuhiko

¯\_(ツ)_/¯

Ok. I will agree to disagree. I don't have a strong enough argument, I just personally don't like it and don't think the extra complexity is valuable here.

But we can keep them all individual config options if others have stronger opinions.

mattrobenolt avatar Mar 08 '16 23:03 mattrobenolt

Could you switch the storage backend to be S3?

mandeepbal avatar Jul 19 '16 14:07 mandeepbal

Closing this issue due to staleness. Feel free to comment here if you think we should still work on this.

BYK avatar Sep 30 '20 12:09 BYK

Btw I think this is done now with the config.yml file.

BYK avatar Sep 30 '20 12:09 BYK