Closed rkevin-arch closed 4 years ago
@rkevin-arch I am thinking you are over-engineering something inside alembic. In https://alembic.sqlalchemy.org/en/latest/api/config.html , it says "this section discusses the internal API of Alembic as regards internal configuration constructs. This section is only useful for developers who wish to extend the capabilities of Alembic. "
We can do something like fd if you cannot create files
The Config object... is needed for the following use cases: ... to programatically run any of the commands in the Commands module.
I feel like using it here is fine, but it's up to you. I can also drop the "readonly file system" restriction if you want to use temporary files, but I feel like it's unnecessary.
Well, the Commands module is also for internal use. I don't know why many people are using it: e.g. https://stackoverflow.com/questions/22178339/is-it-possible-to-store-the-alembic-connect-string-outside-of-alembic-ini But I think we should follow the Jupyterhub / nbgrader's way. I will change it to make sure there is no files created (or at least you can provide a tempdir)
@rkevin-arch Are there at least some directory (e.g. "/dev/shm") available for write?
@rkevin-arch My suggestion is in #73. It only requires that /dev/fd
exists.
@rkevin-arch do you think you can make alembic automatic test cases?
Funnily enough, I made the ngshare container read only and dbutil is unable to create a temporary file. Might as well do it properly and not use subprocess or temp files.