Remove use of deprecated argument (cluster_error_retry_attempts) in RedisCluster.pipeline construction of ClusterPipeline#3670
Conversation
`cluster_error_retry_attempts` is a deprecated argument that was being passed to the constructor of ClusterPipeline from the `pipeline` method.
|
Hi @alisaifee, thank you for your contribution! Unfortunately we can't remove the argument yet. It has been deprecated in 6.0 and we need to keep it at least for three major releases before completely removing it. |
Hi, @petyaslavova - sorry for the confusion, the PR isn't removing return ClusterPipeline(
nodes_manager=self.nodes_manager,
commands_parser=self.commands_parser,
startup_nodes=self.nodes_manager.startup_nodes,
result_callbacks=self.result_callbacks,
cluster_response_callbacks=self.cluster_response_callbacks,
cluster_error_retry_attempts=self.retry.get_retries(),
read_from_replicas=self.read_from_replicas,
load_balancing_strategy=self.load_balancing_strategy,
reinitialize_steps=self.reinitialize_steps,
retry=self.retry,
lock=self._lock,
transaction=transaction,
)As you can see the assignment of if retry is not None:
self.retry = retry
else:
self.retry = Retry(
backoff=ExponentialWithJitterBackoff(base=1, cap=10),
retries=cluster_error_retry_attempts,
)For reference, code coverage also shows that this path is not exercised. |
`cluster_error_retry_attempts` is a deprecated argument that was being passed to the constructor of ClusterPipeline from the `pipeline` method.
`cluster_error_retry_attempts` is a deprecated argument that was being passed to the constructor of ClusterPipeline from the `pipeline` method.
`cluster_error_retry_attempts` is a deprecated argument that was being passed to the constructor of ClusterPipeline from the `pipeline` method.
Pull Request check-list
Please make sure to review and check all of these items:
Description of change
cluster_error_retry_attemptsis a deprecated argument that was being passed to the constructor of ClusterPipeline from thepipelinemethod and thus using the cluster pipeline instance by way of constructing it through thepipeline()method was logging a deprecation warning.Since the value is already being derived from
self.retryandretry=self.retryis already being passed as an argument it should be safe to remove it without any change in behaviour.Example: