Skip to content

Commit e56be18

Browse files
flankbotmoshloopadityathebe
authored
chore: bump duty to v1.0.802 (#1736)
* chore: bump duty to v1.0.802 * fix: don't save agent_id on playbook_run_actions when running on agents the agent_id is the agent's identity on the upstream. the agent itself doesn't have itself as an agent in its db --------- Co-authored-by: moshloop <[email protected]> Co-authored-by: Aditya Thebe <[email protected]>
1 parent cf83c93 commit e56be18

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/containrrr/shoutrrr v0.8.0
1515
github.com/fergusstrange/embedded-postgres v1.29.0 // indirect
1616
github.com/flanksource/commons v1.35.3
17-
github.com/flanksource/duty v1.0.800
17+
github.com/flanksource/duty v1.0.802
1818
github.com/flanksource/gomplate/v3 v3.24.50
1919
github.com/flanksource/kopper v1.0.11
2020
github.com/gomarkdown/markdown v0.0.0-20240419095408-642f0ee99ae2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ github.com/flanksource/artifacts v1.0.14 h1:Vv70bccsae0MwGaf/uSPp34J5V1/PyKfct9z
443443
github.com/flanksource/artifacts v1.0.14/go.mod h1:qHVCnQu5k50aWNJ5UhpcAKEl7pAzqUrFFKGSm147G70=
444444
github.com/flanksource/commons v1.35.3 h1:EG46iWodmSQQbXywjvEAgK56ZH26jYtMv0RiPM3eKDE=
445445
github.com/flanksource/commons v1.35.3/go.mod h1:cLZURmvF0dw3wR5VyPuibRl/7h+NEiyMdo70WhJFB9Y=
446-
github.com/flanksource/duty v1.0.800 h1:tf9JdPKmpYXHlm/y1BAcnJev1aJfuv+eKLXf0ALuBs4=
447-
github.com/flanksource/duty v1.0.800/go.mod h1:SUJg5MSfqt0UUM2l2hP/pPAsipS0Px5L8btRD7fLwM8=
446+
github.com/flanksource/duty v1.0.802 h1:5OLObNalnoWB5wdkzr30DNPHz7IvEZ3UJRodUyX6H8Q=
447+
github.com/flanksource/duty v1.0.802/go.mod h1:SUJg5MSfqt0UUM2l2hP/pPAsipS0Px5L8btRD7fLwM8=
448448
github.com/flanksource/gomplate/v3 v3.24.50 h1:z8wKtFqp6yqKf2aiNfKeiG57/JlvYmpGULApQI+4rM4=
449449
github.com/flanksource/gomplate/v3 v3.24.50/go.mod h1:N8lVd8fnm6gS0l3JWlcJgso2Ol9P2L7CW00gvuIHEk0=
450450
github.com/flanksource/is-healthy v1.0.57 h1:y9lyxu4GxWcghmT8uWAkg0gaC8bAUdJ4aOUGDpe4oQo=

playbook/jobs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ func PullPlaybookAction(ctx job.JobRuntime, upstreamConfig upstream.UpstreamConf
9999
Record(time.Duration(time.Since(response.Action.ScheduledTime).Milliseconds()))
100100

101101
err = ctx.Transaction(func(ctx context.Context, _ trace.Span) error {
102-
// Don't save playbook_run_id to avoid foreign key constraint
103-
if err := ctx.DB().Omit("playbook_run_id").Save(&response.Action).Error; err != nil {
102+
// Don't save playbook_run_id & agent_id to avoid foreign key constraint
103+
if err := ctx.DB().Omit("playbook_run_id", "agent_id").Save(&response.Action).Error; err != nil {
104104
return oops.Wrap(err)
105105
}
106106

0 commit comments

Comments
 (0)