Update wordpress-rs to 0.7.0 - #23237
Conversation
Generated by 🚫 Danger |
Project dependencies changeslist! Upgraded Dependencies
rs.wordpress.api:android:0.7.0, (changed from 0.6.0)
rs.wordpress.api:kotlin:0.7.0, (changed from 0.6.0)tree +--- project :libs:fluxc
-| \--- rs.wordpress.api:android:0.6.0
-| +--- com.squareup.okhttp3:okhttp:5.4.0 (*)
-| +--- com.squareup.okhttp3:okhttp-tls:5.4.0
-| | +--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.4.10 (*)
-| | +--- com.squareup.okio:okio:3.17.0 (*)
-| | \--- com.squareup.okhttp3:okhttp:5.4.0 (*)
-| +--- net.java.dev.jna:jna:5.19.1
-| +--- rs.wordpress.api:kotlin:0.6.0
-| | +--- com.squareup.okhttp3:okhttp:5.4.0 (*)
-| | +--- com.squareup.okhttp3:okhttp-tls:5.4.0 (*)
-| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2 -> 1.11.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.4.10 (*)
-| \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.4.10 (*)
+| \--- rs.wordpress.api:android:0.7.0
+| +--- com.squareup.okhttp3:okhttp:5.4.0 (*)
+| +--- com.squareup.okhttp3:okhttp-tls:5.4.0
+| | +--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.4.10 (*)
+| | +--- com.squareup.okio:okio:3.17.0 (*)
+| | \--- com.squareup.okhttp3:okhttp:5.4.0 (*)
+| +--- net.java.dev.jna:jna:5.19.1
+| +--- rs.wordpress.api:kotlin:0.7.0
+| | +--- com.squareup.okhttp3:okhttp:5.4.0 (*)
+| | +--- com.squareup.okhttp3:okhttp-tls:5.4.0 (*)
+| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2 -> 1.11.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.3.21 -> 2.4.10 (*)
+| \--- org.jetbrains.kotlin:kotlin-stdlib:2.3.21 -> 2.4.10 (*)
-\--- rs.wordpress.api:android:0.6.0 (*)
+\--- rs.wordpress.api:android:0.7.0 (*) |
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
|
|
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #23237 +/- ##
==========================================
- Coverage 37.97% 37.97% -0.01%
==========================================
Files 2336 2336
Lines 127214 127220 +6
Branches 17627 17629 +2
==========================================
Hits 48312 48312
- Misses 74956 74960 +4
- Partials 3946 3948 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0.7.00.7.0
|
@adalpari @nbradbury I have gone through all the |
adalpari
left a comment
There was a problem hiding this comment.
I did some smoke testing, and it looks good to me.
nbradbury
left a comment
There was a problem hiding this comment.
Looks good to me as well ![]()
Handle the two new error variants the exhaustive `when`s in
`MediaRSApiRestClient` now have to cover, and move the comments list
`status` param onto the type `CommentListParams` requires.
`WpApiParamCommentsStatus` supersedes the `CommentStatus.Custom("all")`
and `Custom("approve")` literals the tabs used, because `status=approved`
returned no comments. `.All` and `.Approve` send the same wire values, so
tab contents are unchanged. `.Any` is avoided throughout: it is a
superset that also returns spam and trash.
Changes:
- Map `MediaFileUnreadable` to `GENERIC_ERROR`, where these failures
already landed as a path-less generic error
- Group `ConnectionError` with `DeviceIsOfflineError` to `CONNECTION_ERROR`,
matching `MediaError.fromIOException` on the non-RS path
- Type `CommentsRsListTab.queryStatus` and `firstPageParams` as
`WpApiParamCommentsStatus`
- Update the tab and mapping tests to the new values
… APIs `DefaultAddress` is documented as covering the free WordPress.com address plus the staging and garden subdomains the server files under it. Drop "managed" and "partner", which nothing in wordpress-rs states. Rename the upload pre-flight test, whose name now reads as though it covers `WpRequestResult.MediaFileUnreadable`. It asserts `FS_READ_PERMISSION_DENIED` from the `canReadFile` check and never reaches the network. Changes: - Narrow the `DefaultAddress` doc comment in `FetchAllDomainsUseCase` to the subtypes wordpress-rs documents - Rename `uploadMedia with unreadable file` to name the pre-flight check
Changes: - Drop the `FS_READ_PERMISSION_DENIED` rationale from the `MediaFileUnreadable` branch, keeping the two lines that describe what the variant means - Drop the `ConnectionError` comment; the branch it sits in already says it maps to `CONNECTION_ERROR` - Drop the comment above the upload pre-flight test, whose name states what it covers - Reduce the `WpApiParamCommentsStatus` note in `CommentsRsListTab` to the distinction between `All` and `Any`
a9bebe7 to
f7806bf
Compare


Description
Updates
wordpress-rsfrom0.6.0to0.7.0and adapts to its breaking API changes.New error variants.
RequestExecutionErrorReasongainedConnectionError(the host resolved but refused the connection or was unreachable) andWpRequestResultgainedMediaFileUnreadable. Bothwhenexpressions inMediaRSApiRestClientare deliberately exhaustive with noelse, so these surfaced as compile errors rather than silently degrading toGENERIC_ERROR— the guard doing its job.MediaFileUnreadablemaps toGENERIC_ERROR, which is where these failures already landed as a path-less generic error, so this is a no-op for users.FS_READ_PERMISSION_DENIEDwould claim a permissions problem we have no evidence of.ConnectionErroris grouped withDeviceIsOfflineErrorandInvalidSslErrortoCONNECTION_ERROR. This is a user-visible change: a refused or unreachable server previously arrived asHttpErrorand showed the generic error message, and now shows "connection to server lost". It matchesMediaError.fromIOException, which already mapsConnectExceptiontoCONNECTION_ERRORon the non-RS path, so self-hosted RS sites stop reporting the same physical failure differently from WPCom/XMLRPC ones.Comments list status parameter.
CommentListParams.statusnow takesWpApiParamCommentsStatusinstead ofCommentStatus. The new type exists because the query vocabulary differs from the stored-status vocabulary —status=approvedmatched nothing and silently returned an empty result set.CommentsRsListTabalready worked around that withCommentStatus.Custom("all")andCustom("approve")literals, so each tab's intent was unambiguous and the migration is a straight rename to the typed values..Alland.Approvesend the same wire values the literals did, so tab contents are unchanged..Anyis avoided throughout: it is a superset that also returns spam and trash, which no tab wants.CommentUpdateParams.statusand thetoRsCommentStatus/toAppCommentStatusmappers still useCommentStatus, which0.7.0did not change.Two doc corrections.
DefaultAddresscomment inFetchAllDomainsUseCaseclaimed the subtype covers "managed" and "partner" subdomains. Nothing inwordpress-rsstates that; it documents the free WordPress.com address plus the staging (*.wpcomstaging.com) and garden subdomains the server files under the same subtype.uploadMedia with unreadable fileinMediaRsApiRestClientTestnow reads as though it covers the newMediaFileUnreadablevariant. It does not — it assertsFS_READ_PERMISSION_DENIEDfrom thecanReadFilepre-flight check and never reaches the network. Renamed to name the check it tests. The assertions are unchanged.Follow-ups filed, not addressed here
wordpress-rscached rows are never cleared on logout or site removalisSiteUnreachablereturnsfalsefor an unreachable host on AndroidMediaFileUnreadableis documented more narrowly than it behavesGenericSslErroris never constructed by the Kotlin executorTesting instructions
Comment list tabs return the same contents as before:
Regression sweep on the surfaces that touch
wordpress-rs:*.wordpress.comsite addresses.