Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Specify if the current task should fail with a Warning instead of an Error #66

Open
didiladi opened this issue Aug 18, 2021 · 0 comments

Comments

@didiladi
Copy link
Collaborator

didiladi commented Aug 18, 2021

There is a need for an option in the job executor service which should cause the current task to finish with a Warning instead of an Error in case of a failing job.

Proposed solution:

Introduce an optional property (onError) in the action, which can eiter be Fail, or Warn, whereas Fail is the default:

actions:
  - name: Run My Test
    onError: Warn | Fail
    events:
      - ...

So in case of an error (non-zero status code) of any task executed by the job, we should create the finished event the following way:

_, err = myKeptn.SendTaskFinishedEvent(&keptnv2.EventData{
		Status:  keptnv2.StatusSucceeded,
		Result:  keptnv2.ResultWarning,
		Message: message,
	}, serviceName)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant