Skip to content

Conversation

@sejas
Copy link
Member

@sejas sejas commented Oct 8, 2025

Related issues

Proposed Changes

This PR helps with debugging when a SQLite import error occurs.
In Automattic/wp-cli-sqlite-command#13, I'm moving some WP-CLI warnings to regular stdout. This way, users will receive better messages when they encounter errors while importing a database or site. It also adds more infromation to Studio logs.

Testing Instructions

  • Run npm start
  • Import a Jetpack site or sql file
  • Observe the new logs for each table similarly to:
Importing /var/folders/_x/rbv26n3925q_01dbs4jzd8t80000gn/T/studio_backupldWovT/sql/wp_actionscheduler_actions.sql...
Success: Imported from 'studio-backup-sql-2025-10-08-15-25-59.sql'.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas self-assigned this Oct 8, 2025
@sejas sejas requested a review from a team October 8, 2025 14:44
@sejas sejas changed the title Let's output the SQLite import stdout output and also which table is … Add which table is being imported and SQLite import stdout to Studio logs Oct 8, 2025
@sejas
Copy link
Member Author

sejas commented Oct 8, 2025

I'm not sure if it's useful to display the duration for each SQL file or for the full site backup import as well.

Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

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

Thanks @sejas! I am sure this will become handy for debugging errors. I have tested it by importing a wpress, a jetpack backup and a sql file, and all logged the output as expected. LGTM! :shipit:

wpress backup Jetpack backup sql
Image Image Image

@sejas sejas merged commit 3fd55cf into trunk Oct 8, 2025
12 checks passed
@sejas sejas deleted the add/more-logs-when-importing-sqls branch October 8, 2025 17:17
@wojtekn
Copy link
Contributor

wojtekn commented Oct 9, 2025

Nice improvement @sejas !

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.

4 participants