-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix: skip templating if check fails #863
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for elaborate-horse-ac1743 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -29,14 +29,21 @@ func RunChecks(ctx *context.Context) []*pkg.CheckResult { | |||
|
|||
func transformResults(ctx *context.Context, in []*pkg.CheckResult) (out []*pkg.CheckResult) { | |||
for _, r := range in { | |||
// If check fails, do not apply transform | |||
if !r.Pass { |
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.
!pass doesn't necessarily means it failed to connect - it could have failed a threshold, response code/body check etc.
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.
I went through the checks code and all the errors are raised via .Failf
or .ErrorMessage
(which calls .Failf
inside) all of which sets pass = false.
If not for r.Pass, what should we check against ?
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.
We can add another field called Error = true that ErrorMessage sets - however we might need to update some of the checks to use ErrorMessage instead of Failf for connection errors
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.
Still need to add the error handling
Fixes: #374