Skip to content

Commit

Permalink
fix: various issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jun 8, 2021
1 parent c6a9e6e commit abbf7d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const (
EnvStep = "ARGO_DATAFLOW_STEP"
EnvPeekDelay = "ARGO_DATAFLOW_PEEK_DELAY" // how long between peeking (default 4m)
EnvPullPolicy = "ARGO_DATAFLOW_PULL_POLICY" // default ""
EnvScalingDelay = "ARGO_DATAFLOW_SCALING_DELAY" // // how long to wait between any scaling events (including peeking) default "4m"
EnvUpdateInterval = "ARGO_DATAFLOW_UPDATE_INTERVAL" // default "30s"
EnvScalingDelay = "ARGO_DATAFLOW_SCALING_DELAY" // how long to wait between any scaling events (including peeking) default "4m"
EnvUpdateInterval = "ARGO_DATAFLOW_UPDATE_INTERVAL" // default "1m"
EnvDataflowBearerToken = "ARGO_DATAFLOW_BEARER_TOKEN"
// label/annotation keys
KeyDefaultContainer = "kubectl.kubernetes.io/default-container"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
imageFormat = os.Getenv(dfv1.EnvImageFormat)
runnerImage = ""
pullPolicy = corev1.PullPolicy(os.Getenv(dfv1.EnvPullPolicy))
updateInterval = util.GetEnvDuration(dfv1.EnvUpdateInterval, 30*time.Second)
updateInterval = util.GetEnvDuration(dfv1.EnvUpdateInterval, 1*time.Minute)
logger = util.NewLogger()
)

Expand Down
8 changes: 5 additions & 3 deletions runner/sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"fmt"
"io/ioutil"
"math"
"net/http"
"os"
"strconv"
Expand Down Expand Up @@ -343,8 +344,9 @@ func connectSources(ctx context.Context, toMain func([]byte) error) error {
})
err := wait.ExponentialBackoff(wait.Backoff{
Duration: 100 * time.Millisecond,
Factor: 2,
Cap: time.Second,
Factor: 1.2,
Jitter: 1.2,
Steps: math.MaxInt32,
}, func() (done bool, err error) {
select {
case <-ctx.Done():
Expand All @@ -359,8 +361,8 @@ func connectSources(ctx context.Context, toMain func([]byte) error) error {
return false, nil
}
}
return true, nil
}
return true, nil
})
if err != nil {
withLock(func() { step.Status.SourceStatuses.IncErrors(sourceName, replica, err) })
Expand Down
2 changes: 1 addition & 1 deletion shared/util/rand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func Test_RandString(t *testing.T) {
assert.Len(t, RandString(), 28)
assert.NotEmpty(t, RandString())
}

0 comments on commit abbf7d0

Please sign in to comment.