Skip to content

Commit 12f0e5e

Browse files
committed
fix: correct total counter
1 parent bf7b993 commit 12f0e5e

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v0.0.43 (2021-06-08)
4+
5+
* [a03615d](https://github.com/argoproj/argo-workflows/commit/a03615d7ccd5d7ed68479cdebff76b0ce5e05a17) ok
6+
7+
### Contributors
8+
9+
* Alex Collins
10+
311
## v0.0.42 (2021-06-08)
412

513
* [d2f219f](https://github.com/argoproj/argo-workflows/commit/d2f219f806277636ab5b4c41dd26ea87c887ec3a) ok

runner/sidecar/sidecar.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ func connectSources(ctx context.Context, toMain func([]byte) error) error {
341341
retryPolicy := source.RetryPolicy
342342
f := func(msg []byte) error {
343343
rateCounter.Incr(1)
344+
withLock(func() {
345+
step.Status.SourceStatuses.IncrTotal(sourceName, replica, printable(msg), rateToResourceQuantity(rateCounter))
346+
})
344347
err := wait.ExponentialBackoff(wait.Backoff{
345348
Duration: 100 * time.Millisecond,
346349
Factor: 1.2,
@@ -365,10 +368,6 @@ func connectSources(ctx context.Context, toMain func([]byte) error) error {
365368
}
366369
})
367370
if err != nil {
368-
withLock(func() {
369-
step.Status.SourceStatuses.IncrTotal(sourceName, replica, printable(msg), rateToResourceQuantity(rateCounter))
370-
})
371-
} else {
372371
withLock(func() { step.Status.SourceStatuses.IncrErrors(sourceName, replica, err) })
373372
}
374373
return err

0 commit comments

Comments
 (0)