Skip to content
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

Outbox: Log progress #1407

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open

Outbox: Log progress #1407

wants to merge 4 commits into from

Conversation

obenland
Copy link
Member

@obenland obenland commented Mar 4, 2025

Logs progress of Outbox processing and makes it accessible through the ap_outbox post type API endpoint to make it easier to understand its success.

Screenshot 2025-03-03 at 7 12 43 PM

Proposed changes:

  • Adds a callback that logs Outbox processing progress.

Testing instructions:

  • Update a post.
  • Make sure Outbox item gets processed.
  • Query /wp/v2/ap_outbox and look for the meta key or check the Outbox UI in Debug mode.

@obenland obenland requested a review from a team March 4, 2025 01:30
@obenland obenland self-assigned this Mar 4, 2025
@obenland
Copy link
Member Author

obenland commented Mar 4, 2025

@mattwiebe @pfefferle Do you think this is worth adding? Helpful?

* @param int $batch_size The batch size.
* @param int $offset The offset.
*/
public static function log_progress( $inboxes, $json, $actor_id, $outbox_item_id, $retries, $batch_size, $offset ) {
Copy link
Member

Choose a reason for hiding this comment

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

should we move that to the debug class?

@pfefferle
Copy link
Member

I think the overall question is, how do we provide the user a way to either debug the outbox or to provide us relevant data.

Two ideas:

  1. So maybe we need to think about a log-view that is visible for the admin, that show exactly that data and maybe allows to manually retry.
  2. A report, that might be generated by the "Site Health", that might signal if an outbox does not properly federate any more and maybe some stats that a user can look at under: /wp-admin/site-health.php?tab=debug

This is not an argument against storing the data, but maybe it helps us understand what we want to store and where!?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants