-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(content-distribution): migrator #185
Conversation
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.
Found a couple of smaller things in code – will do a test next, but m not sure I entirely get step 3.
Are these assumptions correct?
Let's say I have hub.test, node1.test, node2.test, node3.test.
hub, node1, and node2 are networked (content distribution enabled). node3 is not. All sites have distributor enabled and are networked.
- to 1 site within the network - so post on hub and distribute to node1?
- to 1 site outside the network - so post on hub and distribute to node3?
- to 2 sites within the network - so post on hub and distribute to node1 and node2?
- to all sites (within and outside the network) - so post on hub and distribute to node1, node2, and node3? (I guess this one is not so hard to understand).
Am I right about the above?
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.
👍 🎉
I ran through the testing scenario and it works like a charm now.
Hey @miguelpeixe, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [2.5.0-alpha.1](v2.4.0...v2.5.0-alpha.1) (2025-01-23) ### Bug Fixes * **content-distribution:** block additional UI components ([#197](#197)) ([3f30cdb](3f30cdb)) * **content-distribution:** handling multiple post meta ([#199](#199)) ([c93084d](c93084d)) * **content-distribution:** Improve CSS for blocked editor ([#193](#193)) ([295bdad](295bdad)), closes [#181](#181) * **content-distribution:** persist site hash ([#186](#186)) ([120b759](120b759)) * **content-distribution:** prevent consecutive dispatches ([#198](#198)) ([2149a62](2149a62)) * **content-distribution:** refactor outgoing post js ([#188](#188)) ([cc08edc](cc08edc)) * **memberships:** remove managed fields on cancel or expire ([#192](#192)) ([67a5cf0](67a5cf0)) ### Features * **content-distribution:** Block the editor for incoming posts ([#181](#181)) ([48b4cae](48b4cae)) * **content-distribution:** confirm dialog for unlinking and relinking posts ([#190](#190)) ([f36bb28](f36bb28)) * **content-distribution:** migrator ([#185](#185)) ([06ec18a](06ec18a)) * **content-distribution:** post status on create ([#189](#189)) ([1ad3e0c](1ad3e0c)) * sync multiple user roles ([#187](#187)) ([9fa833c](9fa833c))
🎉 This PR is included in version 2.5.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Implements a migration tool so sites using Distributor can move to our content distribution functionality for posts being distributed within the network.
The migration is done via CLI:
The tool migrates Distributor's subscriptions, using its metadata to create an outgoing post. A data event is dispatched to migrate the incoming posts so this is handled asynchronously. Because of that, it runs in batches of 50.
Testing
wp newspack-network sync-all