diff --git a/go.mod b/go.mod index f09c52ad2..d3b45cfb1 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/fergusstrange/embedded-postgres v1.25.0 github.com/flanksource/artifacts v1.0.7 github.com/flanksource/commons v1.23.0 - github.com/flanksource/duty v1.0.528 + github.com/flanksource/duty v1.0.530 github.com/flanksource/gomplate/v3 v3.24.8 github.com/flanksource/is-healthy v1.0.18 github.com/flanksource/kommons v0.31.4 diff --git a/go.sum b/go.sum index 9c1af9c87..fc6b75827 100644 --- a/go.sum +++ b/go.sum @@ -854,8 +854,8 @@ github.com/flanksource/artifacts v1.0.7 h1:tLbY4+7l2H06Td3zSgGSwJy9Vfhto+M7L80cm github.com/flanksource/artifacts v1.0.7/go.mod h1:pzO1hirM9RMrkJMsLbZbZyN6elsCwz8SNOk3z+mpv34= github.com/flanksource/commons v1.23.0 h1:nGzX8DewAkQMFK6/P3YbBNbH+m/t2nYqoC51nXFpxoQ= github.com/flanksource/commons v1.23.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.8 h1:77OQfc8LO3UFfEAhpgIaFpuazncbFqHSr72JMCzoGyA= github.com/flanksource/gomplate/v3 v3.24.8/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU= diff --git a/hack/generate-schemas/go.mod b/hack/generate-schemas/go.mod index 9c656439b..268688759 100644 --- a/hack/generate-schemas/go.mod +++ b/hack/generate-schemas/go.mod @@ -5,7 +5,7 @@ go 1.22.3 require ( github.com/flanksource/canary-checker v1.0.0 github.com/flanksource/commons v1.23.0 - github.com/flanksource/duty v1.0.528 + github.com/flanksource/duty v1.0.530 github.com/spf13/cobra v1.8.0 ) diff --git a/hack/generate-schemas/go.sum b/hack/generate-schemas/go.sum index 6f5b3da5d..c5afc07c8 100644 --- a/hack/generate-schemas/go.sum +++ b/hack/generate-schemas/go.sum @@ -736,8 +736,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.23.0 h1:nGzX8DewAkQMFK6/P3YbBNbH+m/t2nYqoC51nXFpxoQ= github.com/flanksource/commons v1.23.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.8 h1:77OQfc8LO3UFfEAhpgIaFpuazncbFqHSr72JMCzoGyA= github.com/flanksource/gomplate/v3 v3.24.8/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU= diff --git a/pkg/jobs/canary/sync_upstream.go b/pkg/jobs/canary/sync_upstream.go index 3fc642180..148eff27e 100644 --- a/pkg/jobs/canary/sync_upstream.go +++ b/pkg/jobs/canary/sync_upstream.go @@ -40,11 +40,11 @@ var ReconcileCanaries = &job.Job{ ctx.History.ResourceType = job.ResourceTypeUpstream ctx.History.ResourceID = UpstreamConf.Host tablesToReconcile := []string{"canaries", "checks", "check_statuses", "check_config_relationships"} - count, failed, err := upstream.ReconcileSome(ctx.Context, UpstreamConf, ReconcilePageSize, tablesToReconcile...) - ctx.History.SuccessCount += count - ctx.History.ErrorCount += failed - if err != nil { - ctx.History.AddError(err.Error()) + summary := upstream.ReconcileSome(ctx.Context, UpstreamConf, 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()) } return nil