-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mine): use SpinnakerRetrofitErrorHandler with MineService (#…
…4679) * test(mine): verify http error case in RegisterCanaryTask These tests ensures the upcoming changes on MineService with SpinnakerRetrofitErrorHandler, will not modify/break the existing functionality. Test covers the existing behaviour of RegisterCanaryTask when some HTTP error has occurred. * fix(mine): handle exceptions when error response body is null in RegisterCanaryTask Before this change the RetrofitError catch block would throw a NullPointerException when error response body is null at line no: https://github.com/spinnaker/orca/blob/613427f41bb16461a7ee8bb0f31212b438d75458/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/RegisterCanaryTask.groovy#L70 Here is the exact stack trace : java.lang.NullPointerException: Cannot set property 'status' on null object at org.codehaus.groovy.runtime.NullObject.setProperty(NullObject.java:80) at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:213) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496) at com.netflix.spinnaker.orca.mine.tasks.RegisterCanaryTask.execute(RegisterCanaryTask.groovy:70) * test(mine): verify network error case in RegisterCanaryTask These tests ensures the upcoming changes on MineService with SpinnakerRetrofitErrorHandler, will not modify/break the fix made in the commit: 9d554a9. * refactor(mine): use SpinnakerRetrofitErrorHandler with MineService This PR lays the foundational work for upgrading the retrofit version to 2.x, specifically focusing on refactoring the exception handling for MineService There is no behaviour changes involved. Couple of tests added to verify the same for only RegisterCanaryTask in the previous commits.
- Loading branch information
1 parent
613427f
commit 886e2b1
Showing
8 changed files
with
284 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.