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

feat: update cassandra connection settings signature #180

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

shubhank-v
Copy link
Contributor

What changes are proposed in this PR?


  • This PR updates the CassandraConnectionSettings method and adds an additional parameter to set the consistency level.

How was this tested?


  • Will test in a feature branch.

@shubhank-v shubhank-v requested a review from a team as a code owner June 14, 2022 03:20
vbmudalige
vbmudalige previously approved these changes Jun 14, 2022
samithdisal
samithdisal previously approved these changes Jun 14, 2022
@@ -160,6 +160,7 @@ class CassandraConnectionSettings:
load_balancing_policy: LoadBalancingPolicy
secrets_manager: CassandraSecretsManager
ssl_options: dict = None
consistency_level: Optional[ConsistencyLevel] = ConsistencyLevel.LOCAL_ONE
Copy link
Contributor

@Rukesh-Kapuluru Rukesh-Kapuluru Jun 14, 2022

Choose a reason for hiding this comment

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

Suggested change
consistency_level: Optional[ConsistencyLevel] = ConsistencyLevel.LOCAL_ONE

This may not work with legacy mode

Copy link

Choose a reason for hiding this comment

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

If we are assigning a default value to it, it doesn't need to be an Optional right?

Copy link

@tusharm tusharm Jun 14, 2022

Choose a reason for hiding this comment

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

@Rukesh-Kapuluru what is "legacy mode"? you mean python?

Copy link
Contributor

Choose a reason for hiding this comment

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

Cassandra connection currently in use old type.Recent option is to use execution profiles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we are assigning a default value to it, it doesn't need to be an Optional right?

Good catch. Removed Optional from type hint.

Copy link
Contributor

@vincentkoc vincentkoc left a comment

Choose a reason for hiding this comment

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

@Rukesh-Kapuluru to make changes

@shubhank-v shubhank-v dismissed stale reviews from samithdisal and vbmudalige via 19f825c June 15, 2022 00:17
@codeclimate
Copy link

codeclimate bot commented Jun 15, 2022

Code Climate has analyzed commit 6c4b9b9 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 49.6% (0.0% change).

View more on Code Climate.

@@ -160,6 +160,7 @@ class CassandraConnectionSettings:
load_balancing_policy: LoadBalancingPolicy
secrets_manager: CassandraSecretsManager
ssl_options: dict = None
consistency_level: Optional[ConsistencyLevel] = ConsistencyLevel.LOCAL_ONE
Copy link
Contributor

Choose a reason for hiding this comment

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

Cassandra connection currently in use old type.Recent option is to use execution profiles.

@Rukesh-Kapuluru Rukesh-Kapuluru merged commit 54c3ed1 into master Jun 15, 2022
@Rukesh-Kapuluru Rukesh-Kapuluru deleted the cassandra-connection-setting branch June 15, 2022 00:53
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.

6 participants