Skip to content

Commit

Permalink
Merge pull request #41 from xmidt-org/feature/bump_deps
Browse files Browse the repository at this point in the history
bump dependencies
  • Loading branch information
kcajmagic authored Apr 11, 2022
2 parents 14f93ae + 04ced12 commit d07468c
Show file tree
Hide file tree
Showing 19 changed files with 1,174 additions and 129 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ 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]

## [v0.7.1]
- bump dependencies [#41](https://github.com/xmidt-org/codex-db/pull/41)
- Updated references to the main branch [#33](https://github.com/xmidt-org/codex-db/pull/33)

## [v0.7.0]
Expand Down Expand Up @@ -57,7 +60,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [v0.1.0]
- Initial creation, moved from: https://github.com/xmidt-org/codex-deploy

[Unreleased]: https://github.com/xmidt-org/codex-db/compare/v0.7.0..HEAD
[Unreleased]: https://github.com/xmidt-org/codex-db/compare/v0.7.1..HEAD
[v0.7.1]: https://github.com/xmidt-org/codex-db/compare/v0.7.0..v0.7.1
[v0.7.0]: https://github.com/xmidt-org/codex-db/compare/v0.6.0..v0.7.0
[v0.6.0]: https://github.com/xmidt-org/codex-db/compare/v0.5.2..v0.6.0
[v0.5.2]: https://github.com/xmidt-org/codex-db/compare/v0.5.1..v0.5.2
Expand Down
4 changes: 2 additions & 2 deletions batchDeleter/batchDeleter.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/go-kit/kit/metrics/provider"
"github.com/goph/emperror"
db "github.com/xmidt-org/codex-db"
"github.com/xmidt-org/webpa-common/logging"
"github.com/xmidt-org/webpa-common/semaphore"
"github.com/xmidt-org/webpa-common/v2/logging"
"github.com/xmidt-org/webpa-common/v2/semaphore"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions batchDeleter/batchDeleter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import (

"github.com/stretchr/testify/mock"

"github.com/xmidt-org/webpa-common/semaphore"
"github.com/xmidt-org/webpa-common/v2/semaphore"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/metrics/provider"
"github.com/stretchr/testify/assert"
"github.com/xmidt-org/webpa-common/xmetrics/xmetricstest"
"github.com/xmidt-org/webpa-common/v2/xmetrics/xmetricstest"
)

func TestNewBatchDeleter(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion batchDeleter/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package batchDeleter
import (
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/provider"
"github.com/xmidt-org/webpa-common/xmetrics"
"github.com/xmidt-org/webpa-common/v2/xmetrics"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions batchInserter/batchInserter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/go-kit/kit/metrics/provider"
"github.com/goph/emperror"
db "github.com/xmidt-org/codex-db"
"github.com/xmidt-org/webpa-common/logging"
"github.com/xmidt-org/webpa-common/semaphore"
"github.com/xmidt-org/webpa-common/v2/logging"
"github.com/xmidt-org/webpa-common/v2/semaphore"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions batchInserter/batchInserter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"github.com/xmidt-org/webpa-common/semaphore"
"github.com/xmidt-org/webpa-common/v2/semaphore"

"github.com/go-kit/kit/log"

Expand All @@ -32,7 +32,7 @@ import (
"github.com/stretchr/testify/mock"

db "github.com/xmidt-org/codex-db"
"github.com/xmidt-org/webpa-common/xmetrics/xmetricstest"
"github.com/xmidt-org/webpa-common/v2/xmetrics/xmetricstest"
)

func TestNewBatchInserter(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion batchInserter/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package batchInserter
import (
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/provider"
"github.com/xmidt-org/webpa-common/xmetrics"
"github.com/xmidt-org/webpa-common/v2/xmetrics"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion blacklist/blacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/go-kit/kit/log"
"github.com/xmidt-org/webpa-common/logging"
"github.com/xmidt-org/webpa-common/v2/logging"
)

const (
Expand Down
6 changes: 5 additions & 1 deletion cassandra/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ package cassandra

import (
"errors"
"github.com/InVisionApp/go-health/v2"
"time"

"github.com/InVisionApp/go-health/v2"
"github.com/go-kit/kit/metrics/provider"
"github.com/goph/emperror"
db "github.com/xmidt-org/codex-db"
Expand Down Expand Up @@ -101,6 +101,10 @@ func CreateDbConnection(config Config, provider provider.Provider, health *healt
clusterConfig.Timeout = config.OpTimeout
// let retry package handle it
clusterConfig.RetryPolicy = &gocql.SimpleRetryPolicy{NumRetries: 1}
// create warn logger from health logger
if health.Logger != nil {
clusterConfig.Logger = &goCqlLogger{Logger: health.Logger}
}
// setup ssl
if config.SSLRootCert != "" && config.SSLCert != "" && config.SSLKey != "" {
clusterConfig.SslOpts = &gocql.SslOptions{
Expand Down
2 changes: 1 addition & 1 deletion cassandra/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
db "github.com/xmidt-org/codex-db"
"github.com/xmidt-org/webpa-common/xmetrics/xmetricstest"
"github.com/xmidt-org/webpa-common/v2/xmetrics/xmetricstest"
"github.com/yugabyte/gocql"
)

Expand Down
20 changes: 20 additions & 0 deletions cassandra/logger.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package cassandra

import hlog "github.com/InVisionApp/go-logger"

// gocql addapter logger to go kit loger
type goCqlLogger struct {
Logger hlog.Logger
}

func (g *goCqlLogger) Print(v ...interface{}) {
g.Logger.Warn(v...)
}

func (g *goCqlLogger) Printf(format string, v ...interface{}) {
g.Logger.Warnf(format, v...)
}

func (g *goCqlLogger) Println(v ...interface{}) {
g.Logger.Warnln(v...)
}
4 changes: 2 additions & 2 deletions cassandra/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/go-kit/kit/metrics"
"github.com/go-kit/kit/metrics/provider"
db "github.com/xmidt-org/codex-db"
"github.com/xmidt-org/webpa-common/xmetrics"
"github.com/xmidt-org/webpa-common/v2/xmetrics"
)

const (
Expand All @@ -42,7 +42,7 @@ const (
SQLDeletedRecordsCounter = "sql_deleted_rows_count"
)

//Metrics returns the Metrics relevant to this package
// Metrics returns the Metrics relevant to this package
func Metrics() []xmetrics.Metric {
return []xmetrics.Metric{
{
Expand Down
19 changes: 7 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
module github.com/xmidt-org/codex-db

go 1.12
go 1.15

require (
github.com/InVisionApp/go-health/v2 v2.1.2
github.com/InVisionApp/go-logger v1.0.1
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 // indirect
github.com/cenkalti/backoff/v3 v3.1.1
github.com/go-kit/kit v0.9.0

github.com/cenkalti/backoff/v3 v3.2.2
github.com/go-kit/kit v0.12.0
github.com/gocql/gocql v1.0.0 // indirect
github.com/goph/emperror v0.17.3-0.20190703203600-60a8d9faa17b
github.com/influxdata/influxdb1-client v0.0.0-20190809212627-fc22c7df067e // indirect
github.com/jinzhu/gorm v1.9.10
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.7.0
github.com/xmidt-org/capacityset v0.1.1
github.com/xmidt-org/webpa-common v1.5.0
github.com/xmidt-org/wrp-go v1.3.3
github.com/xmidt-org/wrp-go/v2 v2.0.1

github.com/yugabyte/gocql v0.0.0-20190522232832-e049977574e9
github.com/xmidt-org/webpa-common/v2 v2.0.4
github.com/yugabyte/gocql v0.0.0-20220204171058-0bd8e6cb12d0
)
Loading

0 comments on commit d07468c

Please sign in to comment.