Skip to content

Conversation

@wzieba
Copy link
Contributor

@wzieba wzieba commented Nov 21, 2025

Description

This PR migrates WCShippingLabelCreationEligibility from WellSql to Room.

The migration, like always, focuses on actually migrating database entities and not fixing threading issues. All database calls on main thread are now more visible though, because of the runBlocking usage.

Test Steps

Images/gif

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

wzieba and others added 4 commits November 21, 2025 11:16
- Convert model to data class with Room annotations
- Use composite primary key [localSiteId, remoteOrderId]
- Replace synthetic primary key with LocalId/RemoteId types
- Add ShippingLabelCreationEligibilityDao with upsert and query methods
- Add comprehensive DAO unit tests covering all operations
- Table name: ShippingLabelCreationEligibilityEntity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Update WCShippingLabelStore to use ShippingLabelCreationEligibilityDao
- Make store constructor internal to allow internal DAO injection
- Use runBlocking for DAO calls outside coroutines
- Remove rowsAffected handling
- Delete WCShippingLabelSqlUtils

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Register WCShippingLabelCreationEligibility entity in WCAndroidDatabase
- Add ShippingLabelCreationEligibilityDao to database
- Increment database version from 74 to 75
- Add AutoMigration(from = 74, to = 75)
- Add WellSql migration 234 to drop legacy table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Remove ADDON_WOOCOMMERCE parameter from test configurations
- Update WCDataStoreTest, WCProductStoreTest, WCShippingLabelStoreTest
- Update WooCommerceStoreTest, WCLeaderboardsStoreTest, WCProductLeaderboardsMapperTest
- Remove unused WellSqlConfig imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit248623d
Direct Downloadwoocommerce-wear-prototype-build-pr15008-248623d.apk

Without this provider, Hilt cannot inject the DAO into WCShippingLabelStore,
causing build failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 21, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit248623d
Direct Downloadwoocommerce-prototype-build-pr15008-248623d.apk

Base automatically changed from migrate_order_shipment_tracking_model to trunk November 27, 2025 17:36
@wzieba wzieba changed the title Migrate shipping label creation eligibility Migrate WCShippingLabelCreationEligibility to Room Nov 28, 2025
@wzieba wzieba added the type: technical debt Represents or solves tech debt of the project. label Nov 28, 2025
@wzieba wzieba added this to the 23.9 milestone Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: technical debt Represents or solves tech debt of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants