-
Notifications
You must be signed in to change notification settings - Fork 0
#271: Implemented checking SCS content for completeness and correctness #272
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
base: main
Are you sure you want to change the base?
Conversation
|
||
def verify_connection(scs: Secrets) -> int: | ||
if BackendSelector(scs).use_itde: | ||
# Question: Is it OK, to let bring_itde_up modify the SCS content, here? |
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.
Is it OK, to let bring_itde_up()
modify the SCS content, here?
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.
Additional question:
- Should the command line really launch the IDTE only for verifying the connection parameters?
- As actually the ITDE does not require actual connection parameters but only offers optional(!) configuration of disk and mem size.
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.
See my comment above.
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.
Also, we need to bring the ITDE up and take it down, in a try .. finally
manner.
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 updated the docstring.
But the question regarding the ITDE is still pending.
def check(self): | ||
""" | ||
Check if the content of the SCS is complete wrt. the selected | ||
backend as the required options depend on the selected backend. |
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.
Please say that the function raises the ScsCliError
if the check fails. I have to look at the code to figure this out.
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.
Thanks.
Please see next push updating the docstring.
def get_option_set(scs_file: Path) -> OptionSet: | ||
""" | ||
Return an instance of an OptionSet if the SCS contains a proper | ||
backend selection. Otherwise report an error and return None. |
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.
Please update the docstring according to your latest changes.
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.
See next push.
@add_params(SCS_OPTIONS) | ||
@click.option( | ||
"--connect/--no-connect", | ||
is_flag=True, |
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.
Can we make the default depend on the backend?
For a DB that is already running it would be a good idea to check that the configuration works. However, for the Docker DB it's a different story. On one hand, starting it up takes time. On the other hand, all you need to check is that the memory parameters are with reasonable range. If we can't start the ITDE it must be for some unrelated reason.
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 very much agree on your statements.
So what should we do then?
Not verify Docker DB?
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 would make the default = False for the DockerDB and True otherwise. Maybe slightly awkward to implement, but not too difficult.
Closes #271