-
Notifications
You must be signed in to change notification settings - Fork 66
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
adds strict_db flag to run/cloud/cluster commands #28
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
==========================================
- Coverage 45.67% 45.65% -0.03%
==========================================
Files 17 17
Lines 2728 2736 +8
==========================================
+ Hits 1246 1249 +3
- Misses 1482 1487 +5
Continue to review full report at Codecov.
|
@@ -72,7 +72,13 @@ def wrapper(args: dict, | |||
zone=zone, | |||
creds=creds) | |||
|
|||
return fn(args, cluster=cluster) if cluster else 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.
This is a minor bug I found while debugging this PR.
@@ -108,7 +108,7 @@ def get_sql_engine( | |||
try: | |||
return _create_sqa_engine(url=url, echo=echo) | |||
|
|||
except (OperationalError, OSError) as e: |
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.
Another minor issue found while testing this PR.
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.
Do you think this makes more sense as a .calibanconfig.json
entry? I can see users forgetting the CLI flag. This seems more like a mode you'd want to engage permanently. Thoughts?
That seems like a good assumption, can/should the options exist in both the config and the cli, so the user can override the defaults? |
I'm inclined to say that it should only exist in the config. If it exists in the cli too, then we need to have a |
Please have a look, this addresses b/158210362, adding a strict_db flag for caliban job execution commands.
This flag will allow the user to request that caliban exit if it cannot connect to the requested database instance specified by the CALIBAN_DB_URL environment variable.