Skip to content

Commit

Permalink
refactor(scm/test): throw SpinnakerServerException with retry false, …
Browse files Browse the repository at this point in the history
…except for network, 404 and 5xx errors
  • Loading branch information
SheetalAtre committed Sep 11, 2023
1 parent 92e8073 commit e5841f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Expand Up @@ -31,7 +31,6 @@
import com.netflix.spinnaker.igor.service.BuildProperties;
import com.netflix.spinnaker.igor.travis.client.logparser.PropertyParser;
import com.netflix.spinnaker.kork.core.RetrySupport;
import com.netflix.spinnaker.kork.exceptions.SpinnakerException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerHttpException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerNetworkException;
import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerServerException;
Expand Down Expand Up @@ -185,9 +184,8 @@ private Map<String, Object> getPropertyFileFromLog(String projectId, Integer pip
|| ((SpinnakerHttpException) e).getResponseCode() >= 500))) {
throw e;
}
SpinnakerException ex = new SpinnakerException(e);
ex.setRetryable(false);
throw ex;
e.setRetryable(false);
throw e;
} catch (IOException e) {
log.error("Error while parsing GitLab CI log to build properties", e);
return properties;
Expand Down
Expand Up @@ -58,8 +58,6 @@ class CommitController extends AbstractCommitController {
} else if(e instanceof SpinnakerHttpException && ((SpinnakerHttpException)e).getResponseCode() == 404) {
return getNotFoundCommitsResponse(projectKey, repositorySlug, requestParams.to, requestParams.from, master.baseUrl)
}
log.error("Unhandled error response, acting like commit response was not found", e)
return getNotFoundCommitsResponse(projectKey, repositorySlug, requestParams.to, requestParams.from, master.baseUrl)
}

commitsResponse.commits.each {
Expand Down

0 comments on commit e5841f6

Please sign in to comment.