Skip to content

Commit 1dc660e

Browse files
[Bugfix] Don't abort plan in case of optional action timeout (#1573)
1 parent 51551e5 commit 1dc660e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- (Maintenance) Reduce binary size
66
- (Maintenance) Update Features Description, Supported K8S Versions and K8S Dependency to 1.28.5
77
- (Feature) (ML) Featurization Job Type
8+
- (Bugfix) Don't abort plan in case of optional action timeout
89

910
## [1.2.36](https://github.com/arangodb/kube-arangodb/tree/1.2.36) (2024-01-08)
1011
- (Documentation) Improvements and fixes for rendered documentation (GH pages)

pkg/deployment/reconcile/plan_executor.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -397,10 +397,14 @@ func (d *Reconciler) executeAction(ctx context.Context, planAction api.Action, a
397397
d.context.CreateEvent(k8sutil.NewPlanAbortedEvent(d.context.GetAPIObject(), string(planAction.Type), planAction.MemberID, planAction.Group.AsRole()))
398398
return false, true, false, false, nil
399399
} else if isActionTimeout(timeout, planAction) {
400+
if planAction.Type.Optional() {
401+
log.Warn("Optional action not finished in time. Skipping")
402+
return true, false, false, false, nil
403+
}
404+
400405
log.Warn("Action not finished in time. Removing the entire plan")
401406
d.context.CreateEvent(k8sutil.NewPlanTimeoutEvent(d.context.GetAPIObject(), string(planAction.Type), planAction.MemberID, planAction.Group.AsRole()))
402407
return false, true, false, false, nil
403-
404408
}
405409

406410
// Timeout not yet expired, come back soon

0 commit comments

Comments
 (0)