You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce retries to databricks psql command (#3492)
## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
Sometimes the connection to the database instance might fail, which can
be remediated with a retry. This change makes the command to retry the
connection 3 times by default.
To disable the retries users can set a `max-retries` value to zero:
```
$ databricks psql my-instance --max-retries 0
```
## Tests
<!-- How have you tested the changes? -->
Added a new acceptance test, modified and existing acceptance test; ran
manual tests on Mac and Windows
<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
Launching psql with connection to my-database.my-host.com...
26
+
Launching psql session to my-database.my-host.com (attempt 1/3)...
27
27
echo-arguments.sh was called with the following arguments: --host=my-database.my-host.com --username=[USERNAME] --port=5432 --dbname=databricks_postgres
Launching psql with connection to my-database.my-host.com...
37
+
Launching psql session to my-database.my-host.com (attempt 1/3)...
38
38
echo-arguments.sh was called with the following arguments: --host=my-database.my-host.com --username=[USERNAME] --port=5432 --dbname=databricks_postgres -c SELECT * FROM my_table --echo-all
0 commit comments