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

refactor(JenkinsClient): make changes to jenkinsclient to use Spinnak… #1130

Merged

Conversation

Luthan95
Copy link
Contributor

…er custom exception instead of RetrofitError using SpinnakerRetrofitErrorHandler

Make Jekinsclient use of spinnakerCustomexception by setting SpinnakerRetrofitErrorHandler as ErrorHandler, so avoid direct use of RetrofitError

@SheetalAtre SheetalAtre force-pushed the jenkinsclient_replace_with_custom_exceptions branch 3 times, most recently from 20a4d6c to 61f1883 Compare August 30, 2023 08:39
@dbyron-sf
Copy link
Contributor

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Sep 14, 2023

update

✅ Branch has been successfully updated

@SheetalAtre SheetalAtre force-pushed the jenkinsclient_replace_with_custom_exceptions branch 2 times, most recently from 105ce22 to 7c3d25e Compare September 15, 2023 11:25
@SheetalAtre SheetalAtre force-pushed the jenkinsclient_replace_with_custom_exceptions branch 4 times, most recently from c2be8a4 to c498bea Compare September 19, 2023 19:46
@dbyron-sf dbyron-sf marked this pull request as ready for review September 20, 2023 15:49
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Sep 20, 2023
@mergify mergify bot added the auto merged label Sep 20, 2023
@dbyron-sf dbyron-sf force-pushed the jenkinsclient_replace_with_custom_exceptions branch from 5de31f6 to 7b08c77 Compare September 20, 2023 15:53
@mergify mergify bot merged commit bd93ceb into spinnaker:master Sep 20, 2023
4 checks passed
dbyron-sf added a commit to spinnakerbot/igor that referenced this pull request Oct 30, 2023
…OfProject

The jenkinsClient inside JenkinsService comes from JenkinsConfig, wihch, as of
spinnaker#1130, uses SpinnakerRetrofitErrorHandler.
Therefore, the getBuilds calls inside the try/catch block inside processBuildsOfProject
throws a SpinnakerServerException.

spinnaker#1130 updated the 'should continue processing other
builds from a master even if one or more build fetches fail' test to throw a
SpinnakerServerException with a RetrofitError as its cause instead of a RuntimeException
with a RetrofitError as its cause.  With spinnaker/kork#1110, the
SpinnakerServerException no longer has a RetrofitError as its cause.  It has the "mock
root cause" exception as its cause.  But, because
spinnaker/kork#1110 adds a url attribute to
SpinnakerServerException, the cause is no longer necessary for including a url in the
"Error communicating with jenkins" log message, and this commit updates the logic
accordingly.
mergify bot pushed a commit that referenced this pull request Oct 30, 2023
* chore(dependencies): Autobump korkVersion

* fix(web): fix exception handling in JenkinsBuildMonitor.processBuildsOfProject

The jenkinsClient inside JenkinsService comes from JenkinsConfig, wihch, as of
#1130, uses SpinnakerRetrofitErrorHandler.
Therefore, the getBuilds calls inside the try/catch block inside processBuildsOfProject
throws a SpinnakerServerException.

#1130 updated the 'should continue processing other
builds from a master even if one or more build fetches fail' test to throw a
SpinnakerServerException with a RetrofitError as its cause instead of a RuntimeException
with a RetrofitError as its cause.  With spinnaker/kork#1110, the
SpinnakerServerException no longer has a RetrofitError as its cause.  It has the "mock
root cause" exception as its cause.  But, because
spinnaker/kork#1110 adds a url attribute to
SpinnakerServerException, the cause is no longer necessary for including a url in the
"Error communicating with jenkins" log message, and this commit updates the logic
accordingly.

* refactor(web/test): clean up exception mocking in JenkinsBuildMonitorSpec

remove unused runtimeException and rename retrofitEx since it's no longer a retrofitEx

---------

Co-authored-by: root <root@2f91e8016c3c>
Co-authored-by: David Byron <dbyron@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants