leorochael commented on issue #3223: superset/config.py creates directory 
before can be overridden
URL: 
https://github.com/apache/incubator-superset/issues/3223#issuecomment-354695139
 
 
   Looking `superset/config.py`, I see no reason why `DATA_DIR` needs to be 
created so early.
   
   None of the uses inside the `config.py` file actually require that 
`DATA_DIR` exist before `config.py` itself finishes loading.
   
   This indicates that it should be fairly safe to move its creation after the 
point where `superset_config` is imported.
   
   The caveat is that any code inside `superset_config.py` should also either 
assume `DATA_DIR` will only exist after `superset_config.py` is finished 
loading or it should create `DATA_DIR` itself.
   
   While #3238 allows an environment variable to point `DATA_DIR` to a writable 
location, providing a workaround for this issue, I think it's still valuable to 
allow `superset_config.py` to override it so that setting an(other) environment 
variable is not required.
   
   If you agree, I can create a PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to