From 686e51b7e498faac43243b6410c2069eabd97b6e Mon Sep 17 00:00:00 2001 From: Nikita Vaniasin Date: Thu, 9 Nov 2023 06:40:00 +0100 Subject: [PATCH] (Bugfix) Proper handling of --agency.retries argument (#1479) --- CHANGELOG.md | 1 + pkg/deployment/agency/loader_retry.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1c51671d..b2558de62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - (Feature) License Manager - (Improvement) Use Async mode for backup creation - (Feature) (ML) CRD +- (Bugfix) Proper handling of --agency.retries argument ## [1.2.35](https://github.com/arangodb/kube-arangodb/tree/1.2.35) (2023-11-06) - (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks diff --git a/pkg/deployment/agency/loader_retry.go b/pkg/deployment/agency/loader_retry.go index b2092b9fd..65b0755f9 100644 --- a/pkg/deployment/agency/loader_retry.go +++ b/pkg/deployment/agency/loader_retry.go @@ -79,7 +79,7 @@ func (i *retryLoader[T]) Refresh(ctx context.Context, discovery agencyCache.Lead i.lock.Lock() defer i.lock.Unlock() - for z := 0; z < i.retries-1; z++ { + for z := 0; z < i.retries; z++ { if err := i.parent.Refresh(ctx, discovery); err != nil { logger.Err(err).Debug("Unable to refresh agency while retrying") continue