Skip to content
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

Introduce default proto V4 w/ fallback (Astra DB). Alias ASTRA_DB_ID #164

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

hemidactylus
Copy link
Collaborator

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 name ASTRA_DB_DATABASE_ID.

@hemidactylus hemidactylus requested a review from nicoloboschi July 1, 2024 15:58
Copy link
Collaborator

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hemidactylus hemidactylus merged commit 16adfca into main Jul 1, 2024
4 checks passed
@hemidactylus hemidactylus deleted the SL-try-force-protocol-version branch July 1, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two-pass init for Astra db case Alias ASTRA_DB_ID for ASTRA_DB_DATABASE_ID in cassio.init
3 participants