-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate creating the DB schema from the engine creation #84
Conversation
336b698
to
d9529a5
Compare
|
||
|
||
def parse_args(): | ||
parser = argparse.ArgumentParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth adding a parameter to specify a DB already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment it's implicitly done by controlling which environment variables are set. As we know we want to use something like Alembic I wasn't sure it was worth making this more complex until we know how best to integrate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hesitating yesterday before writing the comment exactly because of Alambic. However, it does mean that before we support for real the first endpoints (i.e. we can run a given functionality with diracx
only, we need to have Alambic strategy sorted out). I am fine with this though, but we should have it on the road map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought Alambic was already on the roadmap.
it does mean that before we support for real the first endpoints (i.e. we can run a given functionality with diracx only, we need to have Alambic strategy sorted out)
Why is this the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought Alambic was already on the roadmap.
Of course it is, the questions is just where to place it :-)
Why is this the case?
Because if we start with an alternative handcooked solution, we take the usual risk of not investing the effort of doing things properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how adding a CLI parameter to specify the DB makes the sitution any better. It just makes it more likely it gets push off to "later".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is exactly my point :-) So we agree, it just means that we need to start looking at Alambic earlier than I had though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed #88
When running in production we don't want to be filling the DB schema everytime the engine is created.
This PR:
available_implementations
toBaseDB
that retrieves available implementations for a given database name.__main__
module todiracx.db
such that the databases can be initialised with something likepython -m diracx.db init-sql