-
Notifications
You must be signed in to change notification settings - Fork 137
Migrate SitePluginModel to Room
#15098
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
Draft
wzieba
wants to merge
13
commits into
trunk
Choose a base branch
from
migrate_site_plugin_model
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+859
−666
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add SitePluginModel as Room entity with composite PK (siteId, slug) - Add SitePluginDao with suspend methods and deprecated blocking methods for Java interop - Add LocalIdConverter for Room type conversion - Update WPAndroidDatabase to v31 with AutoMigration - Use @upsert annotation for cleaner upsert semantics - Expose protected methods (deleteBySite, upsertAll) and public replaceAllSitePlugins for atomic replace operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Inject SitePluginDao directly instead of database wrapper - Use upsert() and upsertBlocking() methods - Remove insertOrUpdateSitePlugin helper methods - Update response model mappers to create Room entities - Make PluginStore constructor internal (package-private) - Use site.localId() instead of LocalId(site.id) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Inject SitePluginDao instead of WPAndroidDatabase - Use replaceAllSitePlugins() for atomic delete+insert operations - Use site.localId() instead of LocalId(site.id) - Update WCSystemPluginResponse mapper to create Room entities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add SitePluginDaoTest with Room in-memory database - Update SitePluginSqlUtilsTest to use Room DAO and runTest - Update PluginCoroutineStoreTest mock verifications (upsert) - Update WooCommerceStoreTest to use WPAndroidDatabase - Add kotlinx-coroutines-test dependency to fluxc-tests All tests use the new DAO methods (upsert, replaceAllSitePlugins) and proper coroutine testing with runTest instead of runBlocking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Delete PluginSqlUtils.kt (replaced by SitePluginDao) - Delete PluginSqlUtilsWrapper.kt (no longer needed) - Delete old SitePluginModel.java (replaced by Kotlin Room entity) - Delete old SitePluginSqlUtilsTest.java (replaced by SitePluginDaoTest) All functionality has been migrated to Room-based DAO with improved API design (upsert, replaceAllSitePlugins). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Collaborator
Generated by 🚫 Danger |
Collaborator
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
Adjust and fix unit tests execution
Collaborator
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
Collaborator
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
libs/fluxc/src/main/java/org/wordpress/android/fluxc/store/PluginStore.java
Fixed
Show fixed
Hide fixed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: AINFRA-547: Migrate
SitePluginModelDescription
Test Steps
Images/gif
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.