Skip to content

Commit

Permalink
chore: bump duty & fix error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed May 8, 2024
1 parent 13d1575 commit c55cc23
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmd/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func run(cmd *cobra.Command, args []string) error {
return fmt.Errorf("failed to load properties: %v", err)
}

if ok, err := duty.HasMigrationRun(ctx, api.DefaultContext.Pool()); err != nil {
if ok, err := duty.HasMigrationsRun(ctx, api.DefaultContext.Pool()); err != nil {
return fmt.Errorf("failed to check if migrations have run: %w", err)
} else if !ok {
return errors.New("migrations haven't run yet")
return errors.New("Migrations not run, waiting for mission-control pod to start")
}

zapLogger := logger.GetZapLogger()
Expand Down
4 changes: 2 additions & 2 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ var Serve = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
api.DefaultContext = api.NewScrapeContext(db.MustInit())

if ok, err := duty.HasMigrationRun(cmd.Context(), api.DefaultContext.Pool()); err != nil {
if ok, err := duty.HasMigrationsRun(cmd.Context(), api.DefaultContext.Pool()); err != nil {
return fmt.Errorf("failed to check if migrations have run: %w", err)
} else if !ok {
return errors.New("migrations haven't run yet")
return errors.New("Migrations not run, waiting for mission-control pod to start")
}

if err := dutyContext.LoadPropertiesFromFile(api.DefaultContext.DutyContext(), propertiesFile); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/fergusstrange/embedded-postgres v1.25.0
github.com/flanksource/commons v1.22.1
github.com/flanksource/duty v1.0.445
github.com/flanksource/duty v1.0.447
github.com/flanksource/is-healthy v1.0.4
github.com/flanksource/ketall v1.1.6
github.com/flanksource/mapstructure v1.6.0
Expand Down Expand Up @@ -296,7 +296,7 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

replace github.com/flanksource/duty => ../duty
// replace github.com/flanksource/duty => ../duty

// replace github.com/flanksource/ketall => ../ketall

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,8 @@ github.com/fergusstrange/embedded-postgres v1.25.0 h1:sa+k2Ycrtz40eCRPOzI7Ry7Ttk
github.com/fergusstrange/embedded-postgres v1.25.0/go.mod h1:t/MLs0h9ukYM6FSt99R7InCHs1nW0ordoVCcnzmpTYw=
github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw=
github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY=
github.com/flanksource/duty v1.0.447 h1:Dxt7ZVfhboS5jloyWLPt28/MpgrVNL5CfzyCA9s4ZPw=
github.com/flanksource/duty v1.0.447/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.24.2 h1:WZSriw1MaBhzrDV1IOP9eNsupIPxIHy0yTaMOVhCvsk=
github.com/flanksource/gomplate/v3 v3.24.2/go.mod h1:94BxYobZqouGdVezuz6LNto5C+yLMG0LnNnM9CUPyoo=
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-schemas/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/flanksource/duty v1.0.445 // indirect
github.com/flanksource/duty v1.0.447 // indirect
github.com/flanksource/gomplate/v3 v3.24.2 // indirect
github.com/flanksource/is-healthy v1.0.4 // indirect
github.com/flanksource/kubectl-neat v1.0.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions hack/generate-schemas/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw=
github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY=
github.com/flanksource/duty v1.0.445 h1:QsrQUsv971avvPtF9uLMeq/rvarGR475WWsbPzZcBSI=
github.com/flanksource/duty v1.0.445/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI=
github.com/flanksource/duty v1.0.447 h1:Dxt7ZVfhboS5jloyWLPt28/MpgrVNL5CfzyCA9s4ZPw=
github.com/flanksource/duty v1.0.447/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI=
github.com/flanksource/gomplate/v3 v3.24.2 h1:WZSriw1MaBhzrDV1IOP9eNsupIPxIHy0yTaMOVhCvsk=
github.com/flanksource/gomplate/v3 v3.24.2/go.mod h1:94BxYobZqouGdVezuz6LNto5C+yLMG0LnNnM9CUPyoo=
github.com/flanksource/is-healthy v1.0.4 h1:r/dVsi7keR5NGLCTpgO/M6Hah2jRtYNfMh/XJNnxacc=
Expand Down

0 comments on commit c55cc23

Please sign in to comment.