Skip to content

Commit

Permalink
Remove separate module for pkg/log (#168)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Atamanenko <[email protected]>

Co-authored-by: Shri Javadekar <[email protected]>
  • Loading branch information
uthark and shrinandj authored Dec 18, 2020
1 parent 237f93d commit 36a2784
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 52 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ require (
github.com/keikoproj/aws-sdk-go-cache v0.0.0-20200124200058-ab3c8c94044a
github.com/keikoproj/inverse-exp-backoff v0.0.0-20191216014651-04523236b6ca
github.com/keikoproj/kubedog v0.0.1
github.com/keikoproj/upgrade-manager/pkg/log v0.0.0
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.7.1
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0
go.uber.org/zap v1.10.0
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
Expand All @@ -26,5 +26,3 @@ require (
k8s.io/utils v0.0.0-20191218082557-f07c713de883 // indirect
sigs.k8s.io/controller-runtime v0.4.0
)

replace github.com/keikoproj/upgrade-manager/pkg/log => ./pkg/log
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ github.com/keikoproj/aws-sdk-go-cache v0.0.0-20200124200058-ab3c8c94044a h1:T4PG
github.com/keikoproj/aws-sdk-go-cache v0.0.0-20200124200058-ab3c8c94044a/go.mod h1:PqUW3kzHKLscAxysVG6mJz5wmk4JV9GSwX+k4qjqi1c=
github.com/keikoproj/inverse-exp-backoff v0.0.0-20191216014651-04523236b6ca h1:uvqXVaFKbYgjOK+BHvtCMZIa+Mssmq7wuTJM5MPP5Sc=
github.com/keikoproj/inverse-exp-backoff v0.0.0-20191216014651-04523236b6ca/go.mod h1:ziu/tMrrvs8n+AI+HCZBb6wZS609fcMl5ygR2RttEE4=
github.com/keikoproj/kubedog v0.0.0-20200723215425-c0c7312d991a h1:xA9fdTIWn7AeL/i6GoBZioEO8YES9oglBa3R2jjqBsw=
github.com/keikoproj/kubedog v0.0.0-20200723215425-c0c7312d991a/go.mod h1:8aRJYCL//c+RvycK3qsAfuHqyS1EP7Pa4g8M+t1wO3M=
github.com/keikoproj/kubedog v0.0.0-20200811235401-ba2b3f321488 h1:pffyyajzYmkrLJ3lDsmTnbDQtcSzn4ffkNK3dnjHYEU=
github.com/keikoproj/kubedog v0.0.0-20200811235401-ba2b3f321488/go.mod h1:8aRJYCL//c+RvycK3qsAfuHqyS1EP7Pa4g8M+t1wO3M=
github.com/keikoproj/kubedog v0.0.1 h1:SKo5g78QvlXx+JniYGvgohsB/5dm6bdj6ccyyUrnLDs=
github.com/keikoproj/kubedog v0.0.1/go.mod h1:8aRJYCL//c+RvycK3qsAfuHqyS1EP7Pa4g8M+t1wO3M=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
Expand Down Expand Up @@ -453,8 +449,6 @@ golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
Expand Down
17 changes: 7 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ var (
CacheItemsToPrune uint32 = 500
)

var DefaultRetryer = client.DefaultRetryer{
NumMaxRetries: 12,
MinThrottleDelay: time.Second * 5,
MaxThrottleDelay: time.Second * 60,
MinRetryDelay: time.Second * 1,
MaxRetryDelay: time.Second * 5,
}

func init() {

err := upgrademgrv1alpha1.AddToScheme(scheme)
Expand Down Expand Up @@ -120,8 +112,13 @@ func main() {
log.SetLevel("debug")
}

retryer := DefaultRetryer
retryer.NumMaxRetries = maxAPIRetries
retryer := client.DefaultRetryer{
NumMaxRetries: maxAPIRetries,
MinThrottleDelay: time.Second * 5,
MaxThrottleDelay: time.Second * 60,
MinRetryDelay: time.Second * 1,
MaxRetryDelay: time.Second * 5,
}

config := aws.NewConfig().WithRegion(region)
config = config.WithCredentialsChainVerboseErrors(true)
Expand Down
9 changes: 0 additions & 9 deletions pkg/log/go.mod

This file was deleted.

23 changes: 0 additions & 23 deletions pkg/log/go.sum

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/log/retry_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var _ request.Retryer = &RetryLogger{}

func NewRetryLogger(retryer client.DefaultRetryer) *RetryLogger {
return &RetryLogger{
retryer,
DefaultRetryer: retryer,
}
}

Expand Down

0 comments on commit 36a2784

Please sign in to comment.