-
Notifications
You must be signed in to change notification settings - Fork 811
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
chore(exceptions): Fix up what exceptions are thrown #3835
Conversation
In an effor to clean up logs to improve signal to noise ratio of bug vs non-essential/expected failures: * clean up what exceptions are thrown from a bunch of places * anything deriving from UserException won't get logged as a failure * for now, change capacity short circuit to warn instead of error because it is mostly noise. I will work on making it provide accurate signal separately
@@ -82,7 +84,7 @@ class ClusterSizePreconditionTask extends AbstractCloudProviderAwareTask impleme | |||
errors << 'Missing regions' | |||
} | |||
if (errors) { | |||
throw new IllegalStateException("Invalid configuration " + errors.join(',')) | |||
throw new ConfigurationException("Invalid configuration " + errors.join(',')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new ConfigurationException("Invalid configuration " + errors.join(',')) | |
throw new ConfigurationException("Invalid configuration " + errors.join(', ')) |
just to be consistent with line 136?
this.errors = errors; | ||
} | ||
|
||
public PipelineTemplateValidationException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need all these constructors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
silly copy-paste, thank you! removing a bunch of them
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
public class PipelineTemplateValidationException extends UserException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class PipelineTemplateValidationException extends UserException | |
public final class PipelineTemplateValidationException extends UserException |
I made changes in my previous PR (spinnaker#3835) to throw a new exception, but didn't update the catch so this is not again generating noise
I made changes in my previous PR (#3835) to throw a new exception, but didn't update the catch so this is not again generating noise Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* chore(exceptions): Fix up what exceptions are thrown In an effor to clean up logs to improve signal to noise ratio of bug vs non-essential/expected failures: * clean up what exceptions are thrown from a bunch of places * anything deriving from UserException won't get logged as a failure * for now, change capacity short circuit to warn instead of error because it is mostly noise. I will work on making it provide accurate signal separately * fixup! chore(exceptions): Fix up what exceptions are thrown
I made changes in my previous PR (spinnaker#3835) to throw a new exception, but didn't update the catch so this is not again generating noise Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Template validation errors are supposed to bubble up to the surface, but this broke in spinnaker#3835. This PR brings them back.
Template validation errors are supposed to bubble up to the surface, but this broke in spinnaker#3835. This PR brings them back.
* fix(pipeline): Bring back template validation messages in Deck Template validation errors are supposed to bubble up to the surface, but this broke in #3835. This PR brings them back. * Trigger new build Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Chris Thielen <christopherthielen@users.noreply.github.com>
In an effor to clean up logs to improve signal to noise ratio of bug vs non-essential/expected failures: