Skip to content

Commit

Permalink
Merge pull request #335 from werf/fix-force-resource-status-succeeded
Browse files Browse the repository at this point in the history
fix: force resource status to Ready for low-level trackers
  • Loading branch information
ilya-lesikov authored Feb 7, 2024
2 parents 8023300 + d29a5cd commit d647339
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/trackers/dyntracker/dynamic_readiness_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ func (t *DynamicReadinessTracker) trackDeployment(ctx context.Context, tracker *
abort bool
abortErr error
)
status.IsReady = true

t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromDeploymentStatus(&status, ts)
t.handleDeploymentStatus(&status, ts)
Expand Down Expand Up @@ -373,6 +375,8 @@ func (t *DynamicReadinessTracker) trackStatefulSet(ctx context.Context, tracker
abort bool
abortErr error
)
status.IsReady = true

t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromStatefulSetStatus(&status, ts)
t.handleStatefulSetStatus(&status, ts)
Expand Down Expand Up @@ -490,6 +494,8 @@ func (t *DynamicReadinessTracker) trackDaemonSet(ctx context.Context, tracker *d
abort bool
abortErr error
)
status.IsReady = true

t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromDaemonSetStatus(&status, ts)
t.handleDaemonSetStatus(&status, ts)
Expand Down Expand Up @@ -607,6 +613,8 @@ func (t *DynamicReadinessTracker) trackJob(ctx context.Context, tracker *job.Tra
abort bool
abortErr error
)
status.IsSucceeded = true

t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromJobStatus(&status, ts)
t.handleJobStatus(&status, ts)
Expand Down Expand Up @@ -723,6 +731,8 @@ func (t *DynamicReadinessTracker) trackCanary(ctx context.Context, tracker *cana
abort bool
abortErr error
)
status.IsSucceeded = true

t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handleCanaryStatus(&status, ts)
abort, abortErr = t.handleTaskStateStatus(ts)
Expand Down

0 comments on commit d647339

Please sign in to comment.