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

Deal with multiple errors and their criticality #5070

Merged
merged 6 commits into from Jul 15, 2019

Conversation

mpl
Copy link
Collaborator

@mpl mpl commented Jul 8, 2019

What does this PR do?

During the configuration of a router/service, several things can go wrong due to an improper configuration event. So far, for each router/service, we were not handling the fact that several errors can occur for the same entity, i.e. the last error would overwrite all previous errors. And that last error would be the only one showing up through the API handler.
In addition, some of the errors would be critical (i.e. no router would actually be created), while others would not be (the router is created, but with a default differing from what the user specified in the conf), and we were not distinguishing between these two cases.

Therefore, this PR:

  1. makes sure we record all errors that occur.
  2. allows to mark whether an error was critical, and makes it appear in the API handler through the "enabled" or "disabled" statuses.

Motivation

To better deal with configuration errors.

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Co-authored-by: Julien Salleyron julien.salleyron@gmail.com

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit 6fdd485 into traefik:v2.0 Jul 15, 2019
v2 automation moved this from To review to Done Jul 15, 2019
@ldez ldez deleted the slice-errors branch July 15, 2019 17:30
@ldez ldez changed the title config: deal with multiple errors and their criticality Deal with multiple errors and their criticality Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/enhancement a new or improved feature. size/L
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants