Skip to content

Commit

Permalink
Merge pull request #132 from xmidt-org/denopink/refactoring/archive-w…
Browse files Browse the repository at this point in the history
…ebpa-common/logging

Remove `webpa common` and replace `go-kit/log` with `zap` & replace `go-kit/kit/metrics` with `prometheus/client_golang/prometheus`
  • Loading branch information
denopink committed Jan 10, 2023
2 parents 0d4d5a8 + e1a60fa commit 67bb97b
Show file tree
Hide file tree
Showing 16 changed files with 329 additions and 1,124 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
ci:
uses: xmidt-org/.github/.github/workflows/go-ci.yml@go-ci-v1
with:
lint-skip: true
license-skip: true
style-skip: true
secrets: inherit
10 changes: 4 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
linters-settings:
misspell:
locale: US
errorlint:
# Report non-wrapping error creation using fmt.Errorf
errorf: false

linters:
enable:
- bodyclose
- dupl
- errorlint
- funlen
# - funlen
- goconst
- gosec
- misspell
Expand All @@ -24,8 +27,3 @@ issues:
linters:
- dupl
- funlen

linters-settings:
errorlint:
# Report non-wrapping error creation using fmt.Errorf
errorf: false
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- [Remove Deprecated webpa-common #119](https://github.com/xmidt-org/ancla/issues/119)
- [replace go-kit/log with zap #130](https://github.com/xmidt-org/ancla/issues/130)
- [replace go-kit/kit/metrics with prometheus/client_golang/prometheus #131](https://github.com/xmidt-org/ancla/issues/131)
- [Enable & Fix Linter Errors #129](https://github.com/xmidt-org/ancla/issues/129)

## [v0.3.10]
- JWT Migration JWK Migration #113
Expand Down
4 changes: 4 additions & 0 deletions endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ func TestNewAddWebhookEndpoint(t *testing.T) {
}

errFake := errors.New("failed")
// nolint:typecheck
m.On("Add", context.TODO(), "owner-val", input.internalWebook).Return(errFake)
resp, err := endpoint(context.Background(), input)
assert.Nil(resp)
assert.Equal(errFake, err)
// nolint:typecheck
m.AssertExpectations(t)
}

Expand All @@ -48,9 +50,11 @@ func TestGetAllWebhooksEndpoint(t *testing.T) {
endpoint := newGetAllWebhooksEndpoint(m)

respFake := []InternalWebhook{}
// nolint:typecheck
m.On("GetAll", context.TODO()).Return(respFake, nil)
resp, err := endpoint(context.Background(), nil)
assert.Nil(err)
assert.Equal(respFake, resp)
// nolint:typecheck
m.AssertExpectations(t)
}
82 changes: 78 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,92 @@
module github.com/xmidt-org/ancla

go 1.15
go 1.19

require (
github.com/go-kit/kit v0.12.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/spf13/cast v1.5.0
github.com/stretchr/testify v1.8.1
github.com/xmidt-org/argus v0.9.4
github.com/xmidt-org/argus v0.9.5
github.com/xmidt-org/bascule v0.11.2
github.com/xmidt-org/httpaux v0.3.2
github.com/xmidt-org/sallust v0.2.0
github.com/xmidt-org/touchstone v0.1.2
github.com/xmidt-org/webpa-common v1.11.9
github.com/xmidt-org/webpa-common/v2 v2.0.7
go.uber.org/fx v1.19.0
go.uber.org/multierr v1.9.0
go.uber.org/zap v1.24.0
)

require (
emperror.dev/emperror v0.33.0 // indirect
emperror.dev/errors v0.8.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jtacoma/uritemplates v1.0.0 // indirect
github.com/justinas/alice v1.2.0 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.8 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/openzipkin/zipkin-go v0.4.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.14.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/xmidt-org/arrange v0.3.0 // indirect
github.com/xmidt-org/candlelight v0.0.13 // indirect
github.com/xmidt-org/chronon v0.1.1 // indirect
github.com/xmidt-org/clortho v0.0.4 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.11.2 // indirect
go.opentelemetry.io/otel/sdk v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/dig v1.16.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

0 comments on commit 67bb97b

Please sign in to comment.