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 wildcards in Retrofit services and increase read timeout #40

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

gabrielfeo
Copy link
Owner

Fix issues found using the feature preview spec:

  • Add @JvmSuppressWildcards to avoid runtime Retrofit errors. When specs generate strongly typed code, such as kotlin.collections.List<ApiType>, for Java interop this is java.util.List<? extends ApiType> which is not allowed by Retrofit.
  • Increase default read timeout and support overriding it, as some endpoints would timeout with default 10s
  • Also add full request logging if debugLoggingEnabled and fix overriding -Pversion, which was always overwritten by the buildscipt

@github-actions
Copy link
Contributor

Generated API diff

diff -ur ./base-ref-api/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api/GradleEnterpriseApi.kt ./pr-ref-api/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api/GradleEnterpriseApi.kt
--- ./base-ref-api/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api/GradleEnterpriseApi.kt	2023-04-20 20:55:52.142424302 +0000
+++ ./pr-ref-api/src/main/kotlin/com/gabrielfeo/gradle/enterprise/api/GradleEnterpriseApi.kt	2023-04-20 20:55:28.642171087 +0000
@@ -8,6 +8,7 @@
 
 import com.gabrielfeo.gradle.enterprise.api.model.*
 
+@JvmSuppressWildcards
 interface GradleEnterpriseApi {
     /**
      * Create or update a Build Cache Node.

@gabrielfeo gabrielfeo merged commit dc35d41 into main Apr 20, 2023
@gabrielfeo gabrielfeo deleted the timeout branch April 20, 2023 21:02
@gabrielfeo gabrielfeo restored the timeout branch November 30, 2024 02:55
@gabrielfeo gabrielfeo deleted the timeout branch January 6, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant