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

Feature/advanced error handling #294

Open
wants to merge 14 commits into
base: master
from

Conversation

@artemlive
Copy link
Contributor

@artemlive artemlive commented Nov 2, 2020

Here is the issue with the detailed description of this improvement: #293

artemlive added 2 commits Nov 2, 2020
merge latest
…stem and pingdom monitor with method that prevents duplicated check creation
@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 2, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 1 has Failed!

artemlive added 2 commits Nov 2, 2020
@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 2, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 2 has Failed!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 2, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 3 has Failed!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 2, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 4 has Failed!

@artemlive artemlive marked this pull request as draft Nov 3, 2020
…sn't exist
@artemlive artemlive marked this pull request as ready for review Nov 3, 2020
@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 3, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 5 has Failed!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 3, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 6 has Failed!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 3, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 7 has Failed!

@artemlive
Copy link
Contributor Author

@artemlive artemlive commented Nov 3, 2020

Strange thing, because all tests have been passed locally.

time make test &> /dev/null; echo $?

real 0m42.501s
user 0m35.419s
sys 0m8.937s
0

artemlive added 3 commits Nov 3, 2020
This reverts commit 4684028.
@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 3, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 8 has Failed!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 3, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 9 has Failed!

@artemlive
Copy link
Contributor Author

@artemlive artemlive commented Nov 3, 2020

Linter, tests, and builds are fine
I see the mistake in Makefile in the verify section. At least in my local env, it doesn't work because the project doesn't have "test" directory. All other stuff is the same and it works locally. Could someone tell me what exact problem with the last build and why Jenkins build has been failed. Thank you!

@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 12, 2020

@artemlive Yikes! You better fix it before anyone else finds out! Build 10 has Failed!

@ahmedwaleedmalik
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik commented Nov 12, 2020

Hi @artemlive, everything was fine but the test cases were failing against a different provider. I am looking into it and hopefully will resolve that today.
In future, we will move to github actions so that anyone can view the pipeline and there is no inconvenience of such sorts. I'll try to get this prioritized !

Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Hi, please merge the latest master in your branch. Also, there are a fw issues with the PR:

  • You have replaced errors with logs at a lot of places which i don't get it that why is it required
  • For test cases, remove the provider == nil check since that is something i have already handled and we don't want an error in there.
monitor, err := findMonitorByName(r.monitorServices[index], monitorName)
// if there was some error while getting a monitor, re-queue it to try on the next reconcile iteration
if err != nil {
return reconcile.Result{RequeueAfter: RequeueTime}, err
}
Comment on lines +120 to +124

This comment has been minimized.

@ahmedwaleedmalik

ahmedwaleedmalik Nov 12, 2020
Member

If it's unable to create a monitor this will be an endless re-conciliation loop !

This comment has been minimized.

@artemlive

artemlive Nov 12, 2020
Author Contributor

But if it was only the API call error? E.g. API has returned 500 code, and we would be able to add this monitor on the next iteration?

if err != nil {
log.Errorf("Error while handling update: %s", err)
return reconcile.Result{RequeueAfter: RequeueTime}, err
}
Comment on lines 128 to 131

This comment has been minimized.

if err != nil {
log.Errorf("Error while handling create: %s", err)
return reconcile.Result{RequeueAfter: RequeueTime}, err
}
Comment on lines 140 to 143

This comment has been minimized.

This comment has been minimized.

@artemlive

artemlive Nov 12, 2020
Author Contributor

Thanks, I'll fix that.

log.Printf("Application Insights WebTest %s was not found in Resource Group %s", monitorName, aiService.resourceGroup)
return nil, nil
Comment on lines +194 to +195

This comment has been minimized.

@ahmedwaleedmalik

ahmedwaleedmalik Nov 12, 2020
Member

Why are we removing this error from here ?

log.Printf("There is no gcloud MonitorService with name %s found.", name)
return nil, nil
Comment on lines +64 to +65

This comment has been minimized.

@ahmedwaleedmalik

ahmedwaleedmalik Nov 12, 2020
Member

Why are we removing this error from here ?

log.Printf("There is no PingdomMonitorService with name %s found.", name)
return nil, nil
Comment on lines +63 to +64

This comment has been minimized.

@ahmedwaleedmalik

ahmedwaleedmalik Nov 12, 2020
Member

Why are we removing this error from here ?

log.Printf("There is no StatusCakeMonitorService with name %s found.", name)
return nil, nil
Comment on lines +204 to +205

This comment has been minimized.

@ahmedwaleedmalik

ahmedwaleedmalik Nov 12, 2020
Member

Why are we removing this error from here ?

…ntroller into feature/advanced-error-handling
@stakater-user
Copy link
Contributor

@stakater-user stakater-user commented Nov 12, 2020

@artemlive Image is available for testing. docker pull stakater/ingressmonitorcontroller:SNAPSHOT-PR-294-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.