Skip to content

Commit

Permalink
Merge branch 'master' into cdevents-customdatapipelinelevel
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 12, 2024
2 parents bbfbac9 + 98eb168 commit f3e04f8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static retrofit.Endpoints.newFixedEndpoint;

import com.jakewharton.retrofit.Ok3Client;
import com.netflix.spinnaker.echo.jackson.EchoObjectMapper;
import com.netflix.spinnaker.echo.jira.JiraProperties;
import com.netflix.spinnaker.echo.jira.JiraService;
Expand All @@ -32,7 +33,6 @@
import org.springframework.context.annotation.Configuration;
import retrofit.RestAdapter;
import retrofit.client.Client;
import retrofit.client.OkClient;
import retrofit.converter.JacksonConverter;

@Configuration
Expand All @@ -42,7 +42,7 @@ public class JiraConfig {
private static Logger LOGGER = LoggerFactory.getLogger(JiraConfig.class);

@Autowired(required = false)
private OkClient x509ConfiguredClient;
private Ok3Client x509ConfiguredClient;

@Bean
JiraService jiraService(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import com.netflix.spinnaker.echo.scheduler.actions.pipeline.QuartzDiscoveryActi
import com.netflix.spinnaker.echo.scheduler.actions.pipeline.TriggerConverter
import com.netflix.spinnaker.echo.scheduler.actions.pipeline.TriggerListener
import com.netflix.spinnaker.kork.sql.config.DefaultSqlConfiguration
import com.squareup.okhttp.OkHttpClient
import org.quartz.JobDetail
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
Expand All @@ -34,8 +33,6 @@ import org.springframework.context.annotation.Import
import org.springframework.scheduling.quartz.JobDetailFactoryBean
import org.springframework.scheduling.quartz.SchedulerFactoryBean
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean
import retrofit.client.Client
import retrofit.client.OkClient

import javax.sql.DataSource
import java.util.concurrent.TimeUnit
Expand Down
1 change: 1 addition & 0 deletions echo-telemetry/echo-telemetry.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies {
implementation "io.spinnaker.kork:kork-proto"
implementation "io.spinnaker.kork:kork-security"
implementation 'io.spinnaker.kork:kork-web'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client'
implementation 'com.squareup.retrofit:retrofit'
implementation 'com.squareup.retrofit:converter-jackson'
implementation 'de.huxhorn.sulky:de.huxhorn.sulky.ulid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
*/
package com.netflix.spinnaker.echo.config

import com.jakewharton.retrofit.Ok3Client
import com.netflix.spinnaker.echo.config.TelemetryConfig.TelemetryConfigProps
import com.netflix.spinnaker.echo.telemetry.TelemetryService
import com.netflix.spinnaker.retrofit.RetrofitConfigurationProperties
import com.netflix.spinnaker.retrofit.Slf4jRetrofitLogger
import com.squareup.okhttp.OkHttpClient
import de.huxhorn.sulky.ulid.ULID
import java.util.concurrent.TimeUnit
import okhttp3.OkHttpClient
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import retrofit.RestAdapter
import retrofit.client.OkClient
import retrofit.converter.JacksonConverter

@Configuration
Expand Down Expand Up @@ -57,11 +57,12 @@ open class TelemetryConfig {
.create(TelemetryService::class.java)
}

private fun telemetryOkClient(configProps: TelemetryConfigProps): OkClient {
val httpClient = OkHttpClient()
httpClient.setConnectTimeout(configProps.connectionTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
httpClient.setReadTimeout(configProps.readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
return OkClient(httpClient)
private fun telemetryOkClient(configProps: TelemetryConfigProps): Ok3Client {
val httpClient = OkHttpClient.Builder()
.connectTimeout(configProps.connectionTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
.readTimeout(configProps.readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
.build()
return Ok3Client(httpClient)
}

@ConfigurationProperties(prefix = "stats")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fiatVersion=1.50.0
korkVersion=7.242.0
korkVersion=7.243.0
kotlinVersion=1.6.21
org.gradle.parallel=true
spinnakerGradleVersion=8.32.1
Expand Down

0 comments on commit f3e04f8

Please sign in to comment.