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

fix: skip templating if check fails #863

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: skip templating if check fails #863

wants to merge 1 commit into from

Conversation

yashmehrotra
Copy link
Member

@yashmehrotra yashmehrotra commented Mar 15, 2023

Fixes: #374

@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for elaborate-horse-ac1743 ready!

Name Link
🔨 Latest commit 861d70e
🔍 Latest deploy log https://app.netlify.com/sites/elaborate-horse-ac1743/deploys/64117833a2e589000859c06d
😎 Deploy Preview https://deploy-preview-863--elaborate-horse-ac1743.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

E2E - minimal --skip-all

10 tests  ±0   10 ✔️ ±0   1s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 861d70e. ± Comparison against base commit 72cb855.

@github-actions
Copy link

E2E - git

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
1 files   ±0   0 ±0 

Results for commit 861d70e. ± Comparison against base commit 72cb855.

@github-actions
Copy link

E2E - k8s

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
1 files   ±0   0 ±0 

Results for commit 861d70e. ± Comparison against base commit 72cb855.

@github-actions
Copy link

E2E - datasources

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
1 files   ±0   0 ±0 

Results for commit 861d70e. ± Comparison against base commit 72cb855.

@@ -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 {
Copy link
Member

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.

Copy link
Member Author

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 ?

Copy link
Member

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

Copy link
Member

@moshloop moshloop left a 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

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.

ConnectionFailureMode
2 participants