-
Notifications
You must be signed in to change notification settings - Fork 42
refactor: replace default network client with OkHttp #1180
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,10 @@ dependencies { | |
| implementation(libs.bundles.common) | ||
| compileOnly(libs.jetbrains) | ||
| implementation(project(":network-client-core")) | ||
| if (findProperty("okhttp") == null) { | ||
| runtimeOnly(project(":network-client-default")) | ||
| } else { | ||
| if (findProperty("httpURLConnection") == null) { | ||
| runtimeOnly(project(":network-client-okhttp")) | ||
| } else { | ||
| runtimeOnly(project(":network-client-default")) | ||
| } | ||
|
Comment on lines
+25
to
29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainBreaking change: OkHttp is now the default network client. The conditional logic now defaults to OkHttp when the Verify the following before release:
Run this script to verify integration test coverage: 🏁 Script executed: #!/bin/bash
# Check that integration tests cover both HTTP client variants
grep -n "httpURLConnection\|okhttp" .github/workflows/integration-test.yml | head -20Length of output: 187 🏁 Script executed: #!/bin/bash
# Check for CHANGELOG entries about HTTP client changes
fd -e CHANGELOG -e CHANGELOG.md -e changelog.md -e HISTORY -e NEWS | head -10Length of output: 0 🏁 Script executed: #!/bin/bash
# Look for migration guides, release notes, or docs about HTTP client
fd -e md -e txt | xargs grep -l "httpURLConnection\|network.*client\|HTTP.*client" 2>/dev/null | grep -E "(CHANGELOG|README|MIGRATION|RELEASE|GUIDE|NEWS)" | head -20Length of output: 0 🏁 Script executed: #!/bin/bash
# Check if there's a README mentioning the default HTTP client
cat README.md 2>/dev/null | grep -A5 -B5 -i "http.*client\|okhttp\|network" | head -40Length of output: 831 🏁 Script executed: #!/bin/bash
# Find all possible documentation files
find . -type f -name "*CHANGE*" -o -name "*RELEASE*" -o -name "*NEWS*" 2>/dev/null | head -20Length of output: 14 🏁 Script executed: #!/bin/bash
# Check the build.gradle.kts file for comments explaining this logic
cat java/build.gradle.kts | head -40Length of output: 1013 🏁 Script executed: #!/bin/bash
# Look for any docs directory with HTTP client documentation
find . -type d -name "docs" -o -name "doc" 2>/dev/null | xargs ls -la 2>/dev/null | head -30Length of output: 1796 🏁 Script executed: #!/bin/bash
# Search CHANGELOG.md for HTTP client or httpURLConnection related entries
grep -n -A3 -B1 "httpURLConnection\|okhttp\|network.*client\|HTTP.*client" CHANGELOG.md | head -50Length of output: 0 Breaking change: OkHttp is now the default network client — add documentation before release. The conditional logic defaults to OkHttp when the
Users upgrading will unexpectedly receive OkHttp instead of HttpURLConnection without explicit migration instructions. Add entries to CHANGELOG.md documenting the default change and add a section to README.md explaining HTTP client selection and the 🤖 Prompt for AI Agents |
||
| testImplementation(libs.bundles.tests) | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The artifact names for the REST and Realtime test reports will conflict between the httpurlconnection and okhttp test jobs. When both
check-rest-httpurlconnectionandcheck-rest-okhttpjobs run, they will both try to upload artifacts with the namejava-build-reports-rest, and similarly for the realtime jobs. This will cause one artifact to overwrite the other.Consider making the artifact names unique by including the HTTP client variant in the name, for example:
java-build-reports-rest-httpurlconnectionandjava-build-reports-rest-okhttpjava-build-reports-realtime-httpurlconnectionandjava-build-reports-realtime-okhttp