Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified error handling in the engine pkg #998

Merged
merged 2 commits into from
Oct 25, 2019
Merged

Unified error handling in the engine pkg #998

merged 2 commits into from
Oct 25, 2019

Conversation

zen-dog
Copy link
Contributor

@zen-dog zen-dog commented Oct 24, 2019

Summary:

  • unified error format in the form of: Namespace/instance failure in Plan.Phase.Step.Task: ...
  • marking an error as fatal is now done in Go 1.13 style, using %w marker and errors.Is/As methods
  • a more detailed and consistent reason in published engine events

Summary:
- unified error format in form of: `Namespace/instance failure in Plan.Phase.Step.Task: ...`
- marking error as fatal is now done in Go 1.13 style, using `%w` marker and `errors.Is/As` methods
- more detailed and consistent reason in published engine events
Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have few nits and in one place, I think we should wrap in execution error.

Otherwise looks good, nice cleanup 👍

Also we should probably add some documentation at least to the workflow engine about errors we return

pkg/controller/instance/instance_controller.go Outdated Show resolved Hide resolved
pkg/engine/task/task.go Outdated Show resolved Hide resolved
pkg/engine/task/task.go Show resolved Hide resolved
pkg/engine/workflow/engine.go Outdated Show resolved Hide resolved
pkg/engine/workflow/engine.go Outdated Show resolved Hide resolved
and additionally ran `go mod tidy`
@zen-dog zen-dog merged commit ca57d04 into master Oct 25, 2019
@zen-dog zen-dog deleted the ad/engine-errors branch October 25, 2019 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants