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

fix(retrofit): use OkHttpClient from Kork #1673

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Conversation

mattgogerly
Copy link
Member

Not sure why Gate has its own OkHttpClient, but by using the Bean from kork we get all the magic stuff like Brave tracing.

@dbyron-sf
Copy link
Contributor

@mattgogerly would you mind linking to the bean in kork?

@mattgogerly
Copy link
Member Author

mattgogerly commented Jun 28, 2023

@mattgogerly would you mind linking to the bean in kork?

Here.

So far as I can see Orca/Front50/Fiat already use it. I haven't checked anywhere else. Output from /beans for Fiat:

"okhttp3Client": {
  "aliases": [],
  "scope": "singleton",
  "type": "okhttp3.OkHttpClient",
  "resource": "class path resource [com/netflix/spinnaker/config/okhttp3/RawOkHttpClientConfiguration.class]",
  "dependencies": [
    "rawOkHttpClientConfiguration",
    "ok-http-client-com.netflix.spinnaker.okhttp.OkHttpClientConfigurationProperties",
    "spinnakerRequestHeaderInterceptor",
    "okHttp3MetricsInterceptor",
    "httpTracing"
  ]
}

@dbyron-sf
Copy link
Contributor

OK, and then the idea is that this from gate's Main:

@SpringBootApplication(
  scanBasePackages = [
    "com.netflix.spinnaker.gate",
    "com.netflix.spinnaker.config"
  ],

picks it up because com.netflix.spinnaker.config.okhttp3 is part of com.netflix.spinnaker.config ?

@mattgogerly
Copy link
Member Author

mattgogerly commented Jun 28, 2023

OK, and then the idea is that this from gate's Main:

@SpringBootApplication(
  scanBasePackages = [
    "com.netflix.spinnaker.gate",
    "com.netflix.spinnaker.config"
  ],

picks it up because com.netflix.spinnaker.config.okhttp3 is part of com.netflix.spinnaker.config ?

Correct. Also, the OkHttp3ClientConfiguration bean this was using is already coming from Kork.

@mattgogerly mattgogerly added the ready to merge Approved and ready for merge label Jun 28, 2023
@mergify mergify bot added the auto merged label Jun 28, 2023
@mergify mergify bot merged commit fff621a into master Jun 28, 2023
@mattgogerly mattgogerly deleted the fix/kork-retrofit branch June 28, 2023 20:10
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.

3 participants