Skip to content

Commit

Permalink
chore: bump commons
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jan 15, 2024
1 parent d0a7888 commit 98eeacd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 26 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/asecurityteam/rolling v2.0.4+incompatible
github.com/exaring/otelpgx v0.5.2
github.com/fergusstrange/embedded-postgres v1.25.0
github.com/flanksource/commons v1.20.1
github.com/flanksource/commons v1.20.3
github.com/flanksource/gomplate/v3 v3.20.29
github.com/flanksource/kommons v0.31.4
github.com/flanksource/postq v0.1.3
Expand Down Expand Up @@ -182,5 +182,3 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

// replace github.com/flanksource/commons => ../commons
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fergusstrange/embedded-postgres v1.25.0 h1:sa+k2Ycrtz40eCRPOzI7Ry7TtkWXXJ+YRsxpKMDhxK0=
github.com/fergusstrange/embedded-postgres v1.25.0/go.mod h1:t/MLs0h9ukYM6FSt99R7InCHs1nW0ordoVCcnzmpTYw=
github.com/flanksource/commons v1.20.1 h1:siYEj55LeSK30vkWLM5NjSLcbuCluruZRopj/UdQd4I=
github.com/flanksource/commons v1.20.1/go.mod h1:bs2nMwaTCpTQGZNtJv8KNqEVyfGjFZTGUDaAbPHB1cw=
github.com/flanksource/commons v1.20.3 h1:8HQvskTl6yghQIEMuLs4RWUtt9NS60MPD/iyG32VrYI=
github.com/flanksource/commons v1.20.3/go.mod h1:bs2nMwaTCpTQGZNtJv8KNqEVyfGjFZTGUDaAbPHB1cw=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.20.29 h1:hDrNw1JaQk+gmhSCvqng+nebYAt3a5afhf/Vdmr4CTs=
github.com/flanksource/gomplate/v3 v3.20.29/go.mod h1:GKmptFMdr2LbOuqwQZrmo9a/UygyZ0pbXffks8MuYhE=
Expand Down
10 changes: 1 addition & 9 deletions gorm/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"os"
"time"

"github.com/sirupsen/logrus"

"github.com/flanksource/commons/logger"
gLogger "gorm.io/gorm/logger"
)
Expand Down Expand Up @@ -49,13 +47,7 @@ func NewGormLogger(level string) gLogger.Interface {
)
}

l := logrus.New()
l.SetFormatter(&logrus.TextFormatter{
ForceColors: true,
DisableQuote: true,
})

currentGormLogger := logger.NewLogrusLogger(l)
currentGormLogger := logger.StandardLogger().Named("db")

switch level {
case "trace":
Expand Down
2 changes: 1 addition & 1 deletion hack/migrate/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/flanksource/duty/hack/migrate
go 1.20

require (
github.com/flanksource/commons v1.20.0
github.com/flanksource/commons v1.20.3
github.com/flanksource/duty v1.0.180
github.com/spf13/cobra v1.7.0
)
Expand Down
4 changes: 2 additions & 2 deletions hack/migrate/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flanksource/commons v1.20.0 h1:1z7FHGsCY7F7zMx4m0OlzYCUvCc1caREPp7vf1xyeCQ=
github.com/flanksource/commons v1.20.0/go.mod h1:bs2nMwaTCpTQGZNtJv8KNqEVyfGjFZTGUDaAbPHB1cw=
github.com/flanksource/commons v1.20.3 h1:8HQvskTl6yghQIEMuLs4RWUtt9NS60MPD/iyG32VrYI=
github.com/flanksource/commons v1.20.3/go.mod h1:bs2nMwaTCpTQGZNtJv8KNqEVyfGjFZTGUDaAbPHB1cw=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.20.29 h1:hDrNw1JaQk+gmhSCvqng+nebYAt3a5afhf/Vdmr4CTs=
github.com/flanksource/gomplate/v3 v3.20.29/go.mod h1:GKmptFMdr2LbOuqwQZrmo9a/UygyZ0pbXffks8MuYhE=
Expand Down
11 changes: 2 additions & 9 deletions tests/upstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var _ = ginkgo.Describe("Config Changes & Analyses sync test", ginkgo.Ordered, f
var upstreamConf upstream.UpstreamConfig
const agentName = "my-agent"

ginkgo.It("prepare upstream database", func() {
ginkgo.BeforeAll(func() {
var err error
upstreamCtx, drop, err = setup.NewDB(DefaultContext, "upstream")
Expect(err).ToNot(HaveOccurred())
Expand All @@ -35,13 +35,10 @@ var _ = ginkgo.Describe("Config Changes & Analyses sync test", ginkgo.Ordered, f
err = upstreamCtx.DB().Select("COUNT(*)").Model(&models.ConfigAnalysis{}).Scan(&analyses).Error
Expect(err).ToNot(HaveOccurred())
Expect(analyses).To(Equal(0))

agent := models.Agent{Name: agentName}
err = upstreamCtx.DB().Create(&agent).Error
Expect(err).ToNot(HaveOccurred())
})

ginkgo.It("should setup upstream echo server", func() {
var port int
e := echo.New()
e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
Expand All @@ -62,7 +59,6 @@ var _ = ginkgo.Describe("Config Changes & Analyses sync test", ginkgo.Ordered, f
AgentName: agentName,
}
})

ginkgo.It("should push config items first to satisfy foregin keys for changes & analyses", func() {
reconciler := upstream.NewUpstreamReconciler(upstreamConf, 100)

Expand Down Expand Up @@ -127,11 +123,8 @@ var _ = ginkgo.Describe("Config Changes & Analyses sync test", ginkgo.Ordered, f
}
})

ginkgo.It("should stop echo server ", func() {
ginkgo.AfterAll(func() {
echoCloser()
})

ginkgo.It("should drop upstream database ", func() {
drop()
})
})

0 comments on commit 98eeacd

Please sign in to comment.