Skip to content

Commit

Permalink
Use RunnerResponse http client method
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmilic committed Aug 15, 2024
1 parent 4133030 commit c9061e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
github.com/harness/godotenv/v2 v2.0.0
github.com/harness/godotenv/v3 v3.0.0
github.com/shirou/gopsutil/v3 v3.23.5
github.com/wings-software/dlite v1.0.0-rc.10.0.20240814162216-f8ba0cbef767
github.com/wings-software/dlite v1.0.0-rc.10.0.20240815144723-959a84361749
golang.org/x/net v0.17.0
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ github.com/wings-software/dlite v1.0.0-rc.10.0.20240809113220-0e1170e3f3e6 h1:Ko
github.com/wings-software/dlite v1.0.0-rc.10.0.20240809113220-0e1170e3f3e6/go.mod h1:zZd6iaMk8Av1QSABGuDWdxBFO82MxE0r6PRoDsLDvCE=
github.com/wings-software/dlite v1.0.0-rc.10.0.20240814162216-f8ba0cbef767 h1:qPsR/5fV6eL5kH1V8ltUYO4wJxrP0p/e0QNjnLgtkKM=
github.com/wings-software/dlite v1.0.0-rc.10.0.20240814162216-f8ba0cbef767/go.mod h1:zZd6iaMk8Av1QSABGuDWdxBFO82MxE0r6PRoDsLDvCE=
github.com/wings-software/dlite v1.0.0-rc.10.0.20240815144723-959a84361749 h1:dPNucBCqbHbSUTVBDy1O+4J8oCZ5SdgflFqnZKEN1VM=
github.com/wings-software/dlite v1.0.0-rc.10.0.20240815144723-959a84361749/go.mod h1:zZd6iaMk8Av1QSABGuDWdxBFO82MxE0r6PRoDsLDvCE=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
2 changes: 2 additions & 0 deletions pipeline/runtime/step_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ func (e *StepExecutor) sendStepStatus(r *api.StartStepRequest, response *api.VMT

func (e *StepExecutor) sendStatus(r *api.StartStepRequest, delegateClient *delegate.HTTPClient, response *api.VMTaskExecutionResponse) error {
if r.StepStatus.RunnerResponse {
logrus.WithField("id", r.ID).Infoln("Sending runner step status")
status := client.Success
if response.CommandExecutionStatus == api.Failure {
status = client.Failure
Expand All @@ -430,6 +431,7 @@ func (e *StepExecutor) sendStatus(r *api.StartStepRequest, delegateClient *deleg
}
return delegateClient.SendRunnerStatus(context.Background(), r.StepStatus.DelegateID, r.StepStatus.TaskID, taskResponse)
} else {
logrus.WithField("id", r.ID).Infoln("Sending legacy step status")
// For legacy backwards compatibility treat timeout as failure
if response.CommandExecutionStatus == api.Timeout {
response.CommandExecutionStatus = api.Failure
Expand Down

0 comments on commit c9061e2

Please sign in to comment.