Skip to content

Commit

Permalink
chore: bump duty to v1.0.530 (#697)
Browse files Browse the repository at this point in the history
* chore: bump duty to v1.0.530

* fix: reconile job

---------

Co-authored-by: moshloop <[email protected]>
Co-authored-by: Aditya Thebe <[email protected]>
  • Loading branch information
3 people authored Jul 8, 2024
1 parent 6c8bbc3 commit 789ba21
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/fergusstrange/embedded-postgres v1.25.0
github.com/flanksource/commons v1.24.0
github.com/flanksource/duty v1.0.528
github.com/flanksource/duty v1.0.530
github.com/flanksource/is-healthy v1.0.18
github.com/flanksource/ketall v1.1.7
github.com/flanksource/mapstructure v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,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.24.0 h1:fULNc9Rl9YlJU2qYFFMOALVyBUauaGUaQdDb3qvlgBQ=
github.com/flanksource/commons v1.24.0/go.mod h1:bqFwYGdHe1pr3YNBUpnM92s4jCrM9ZJkzZCEwTEdI9U=
github.com/flanksource/duty v1.0.528 h1:2Z14zdteypQQajOWMFCLAdB9xf5riNtALYqdOigwY3M=
github.com/flanksource/duty v1.0.528/go.mod h1:4renLmQZsi9QMFT9xBO+bLxjn5KzJ9PI/iq3Wm2+5Zg=
github.com/flanksource/duty v1.0.530 h1:vZU/3vL8DBg+zxFSm+QlGHQKpl3m357owvE0lD6y5R0=
github.com/flanksource/duty v1.0.530/go.mod h1:4renLmQZsi9QMFT9xBO+bLxjn5KzJ9PI/iq3Wm2+5Zg=
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 @@ -5,7 +5,7 @@ go 1.22.2
require (
github.com/flanksource/commons v1.24.0
github.com/flanksource/config-db v0.0.65
github.com/flanksource/duty v1.0.528
github.com/flanksource/duty v1.0.530
github.com/spf13/cobra v1.7.0
)

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 @@ -243,8 +243,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.24.0 h1:fULNc9Rl9YlJU2qYFFMOALVyBUauaGUaQdDb3qvlgBQ=
github.com/flanksource/commons v1.24.0/go.mod h1:bqFwYGdHe1pr3YNBUpnM92s4jCrM9ZJkzZCEwTEdI9U=
github.com/flanksource/duty v1.0.528 h1:2Z14zdteypQQajOWMFCLAdB9xf5riNtALYqdOigwY3M=
github.com/flanksource/duty v1.0.528/go.mod h1:4renLmQZsi9QMFT9xBO+bLxjn5KzJ9PI/iq3Wm2+5Zg=
github.com/flanksource/duty v1.0.530 h1:vZU/3vL8DBg+zxFSm+QlGHQKpl3m357owvE0lD6y5R0=
github.com/flanksource/duty v1.0.530/go.mod h1:4renLmQZsi9QMFT9xBO+bLxjn5KzJ9PI/iq3Wm2+5Zg=
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.18 h1:ECOKpPZ6mPLDgQlnNm1XPB0QPxutESV760liBNVd5jo=
Expand Down
11 changes: 6 additions & 5 deletions jobs/sync_upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ var ReconcileConfigs = &job.Job{
Fn: func(ctx job.JobRuntime) error {
ctx.History.ResourceType = job.ResourceTypeUpstream
ctx.History.ResourceID = api.UpstreamConfig.Host
count, fkFailed, err := upstream.ReconcileSome(ctx.Context, api.UpstreamConfig, ReconcilePageSize, tablesToReconcile...)
if err != nil {
ctx.History.AddError(err.Error())
summary := upstream.ReconcileSome(ctx.Context, api.UpstreamConfig, ReconcilePageSize, tablesToReconcile...)
ctx.History.AddDetails("summary", summary)
ctx.History.SuccessCount, ctx.History.ErrorCount = summary.GetSuccessFailure()
if summary.Error() != nil {
ctx.History.AddDetails("errors", summary.Error())
}
ctx.History.ErrorCount += fkFailed
ctx.History.SuccessCount += count

return nil
},
}
Expand Down

0 comments on commit 789ba21

Please sign in to comment.