Skip to content

Conversation

@miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Jan 22, 2025

Implements 2 new features to the migration:

  • --dry-run flag for the CLI command
  • Lock editing distributed posts for 10 minutes after a migration to give time for the incoming posts to process:
image

Testing

  1. Using Distributor, distribute a post to a couple of nodes
  2. Run the dry run migration:
wp newspack network distributor migrate --all --dry-run
  1. Confirm you get information about the migration but it doesn't go through
  2. Run the migration:
wp newspack network distributor migrate --all
  1. Confirm the migration runs
  2. Visit the posts dashboard in the distribution origin and confirm you get the notice as in the image above and you're unable to edit the distributed posts (other posts should be fine)
  3. Wait 10 minutes or manually delete the transient:
wp transient delete newspack_network_distributor_migration_lock
  1. Refresh the page and confirm the notice is gone and you are able to edit the posts

@miguelpeixe miguelpeixe marked this pull request as ready for review January 23, 2025 13:57
@miguelpeixe miguelpeixe requested a review from a team as a code owner January 23, 2025 13:57
@miguelpeixe miguelpeixe self-assigned this Jan 23, 2025
@miguelpeixe miguelpeixe requested a review from naxoc January 23, 2025 13:57
Copy link
Member

@naxoc naxoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Tested and works 👍

@miguelpeixe miguelpeixe merged commit 9c61fa8 into trunk Jan 24, 2025
4 checks passed
@miguelpeixe miguelpeixe deleted the fix/content-distribution-migration-tweaks branch January 24, 2025 12:51
@github-actions
Copy link

Hey @miguelpeixe, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

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! ❤️

matticbot pushed a commit that referenced this pull request Feb 7, 2025
# [2.6.0-alpha.1](v2.5.0...v2.6.0-alpha.1) (2025-02-07)

### Bug Fixes

* **content-distribution:** use payload hash on partial updates ([#207](#207)) ([31b342d](31b342d))
* **event-log:** data css overflow ([#206](#206)) ([f81adfe](f81adfe))

### Features

* **content-distribution:** migration tweaks ([#201](#201)) ([9c61fa8](9c61fa8))
* **content-distribution:** partial payload ([#205](#205)) ([b844d06](b844d06))
* **content-distribution:** remove "Quick Edit" from linked posts ([#200](#200)) ([6ad3a4a](6ad3a4a))
* **content-distribution:** Sync authors ([#194](#194)) ([3156d35](3156d35))
* increase pull frequency and amount ([#209](#209)) ([6791da1](6791da1))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.6.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Feb 17, 2025
# [2.6.0](v2.5.0...v2.6.0) (2025-02-17)

### Bug Fixes

* **content-distribution:** use payload hash on partial updates ([#207](#207)) ([31b342d](31b342d))
* **event-log:** data css overflow ([#206](#206)) ([f81adfe](f81adfe))

### Features

* **content-distribution:** migration tweaks ([#201](#201)) ([9c61fa8](9c61fa8))
* **content-distribution:** partial payload ([#205](#205)) ([b844d06](b844d06))
* **content-distribution:** remove "Quick Edit" from linked posts ([#200](#200)) ([6ad3a4a](6ad3a4a))
* **content-distribution:** Sync authors ([#194](#194)) ([3156d35](3156d35))
* increase pull frequency and amount ([#209](#209)) ([6791da1](6791da1))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants