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
Contributor

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

@traefiker traefiker added this to the 2.0 milestone Jul 8, 2019

@mpl mpl added this to To review in v2 via automation Jul 8, 2019

@mpl mpl force-pushed the juliens:slice-errors branch from 930456a to e61b02f Jul 8, 2019

@ldez ldez self-requested a review Jul 11, 2019

@juliens
Copy link
Member

left a comment

LGTM

@ldez ldez force-pushed the juliens:slice-errors branch 3 times, most recently from 353adcc to d176fef Jul 14, 2019

@SantoDE
Copy link
Contributor

left a comment

LGTM :)

@ldez
ldez approved these changes Jul 15, 2019
Copy link
Member

left a comment

LGTM

@ldez ldez force-pushed the juliens:slice-errors branch from 3cf721f to b85f621 Jul 15, 2019

@traefiker traefiker merged commit 6fdd485 into containous:v2.0 Jul 15, 2019

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
semaphoreci The build passed on Semaphore.
Details

v2 automation moved this from To review to Done Jul 15, 2019

@ldez ldez deleted the juliens:slice-errors branch Jul 15, 2019

@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
Projects
5 participants
You can’t perform that action at this time.