Introduce default proto V4 w/ fallback (Astra DB). Alias ASTRA_DB_ID #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses two longstanding issues.
Fixes #123
Fixes #117
Details for #123:
The Cassandra drivers receive, and duly report, an "error" from the database in case protocol version negotiation takes place with Astra that ends up on the current Astra DB version, V4. This surfaces as an error (which confuses/scares users), despite the application then running regularly after that. In order to avoid this "error", one has to explicitly provide the right protocol version. This PR does that, in the case of the Astra DB path for
cassio.init
. The whole protocol-specifying part is wrapped in a try-except that falls back to the regular no-protocol behaviour: should Astra DB ever change its protocol, the worst that happens is the user gets the "error" again and execution continues just fine.Details for #117 :
Almost anywhere else, the standard name for the env. variable with the database ID is
ASTRA_DB_ID
. This PR switches to using that as the standard naming, but preserves complete compatibility with the previous nameASTRA_DB_DATABASE_ID
.