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(retrofit): replace OkClient with Ok3Client #1844

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.spinnaker.gate.config

import com.jakewharton.retrofit.Ok3Client
import com.netflix.spinnaker.gate.services.PagerDutyService
import groovy.transform.CompileStatic
import org.springframework.beans.factory.annotation.Value
Expand All @@ -25,7 +26,6 @@ import org.springframework.context.annotation.Configuration
import retrofit.Endpoint
import retrofit.RequestInterceptor
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter

import static retrofit.Endpoints.newFixedEndpoint
Expand Down Expand Up @@ -56,7 +56,7 @@ class PagerDutyConfig {
PagerDutyService pagerDutyService(Endpoint pagerDutyEndpoint) {
new RestAdapter.Builder()
.setEndpoint(pagerDutyEndpoint)
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.setRequestInterceptor(requestInterceptor)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.netflix.spinnaker.gate

import com.fasterxml.jackson.databind.ObjectMapper
import com.jakewharton.retrofit.Ok3Client
import com.netflix.spectator.api.NoopRegistry
import com.netflix.spinnaker.config.ErrorConfiguration
import com.netflix.spinnaker.fiat.shared.FiatClientConfigurationProperties
Expand All @@ -41,7 +42,6 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
import retrofit.RetrofitError
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter
import retrofit.mime.TypedInput
import spock.lang.Shared
Expand Down Expand Up @@ -116,7 +116,7 @@ class FunctionalSpec extends Specification {
def localPort = ctx.environment.getProperty("local.server.port")
api = new RestAdapter.Builder()
.setEndpoint("http://localhost:${localPort}")
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.setLogLevel(RestAdapter.LogLevel.FULL)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.netflix.spinnaker.gate.controllers

import com.fasterxml.jackson.databind.ObjectMapper
import com.jakewharton.retrofit.Ok3Client
import com.netflix.spinnaker.gate.services.WebhookService
import com.netflix.spinnaker.gate.services.internal.EchoService
import com.netflix.spinnaker.gate.services.internal.OrcaServiceSelector
Expand All @@ -29,7 +30,6 @@ import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.setup.MockMvcBuilders
import org.springframework.web.util.NestedServletException
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter
import spock.lang.Specification

Expand All @@ -54,7 +54,7 @@ class WebhooksControllerSpec extends Specification {

EchoService echoService = new RestAdapter.Builder()
.setEndpoint("http://localhost:${localPort}")
.setClient(new OkClient())
.setClient(new Ok3Client())
.setConverter(new JacksonConverter())
.build()
.create(EchoService)
Expand Down