Skip to content

feat(dev-env): add some logging to DevEnvSyncSQLCommand#2443

Merged
sjinks merged 2 commits intotrunkfrom
add/debug
Jul 7, 2025
Merged

feat(dev-env): add some logging to DevEnvSyncSQLCommand#2443
sjinks merged 2 commits intotrunkfrom
add/debug

Conversation

@sjinks
Copy link
Copy Markdown
Member

@sjinks sjinks commented Jul 2, 2025

Description

This PR adds logging to the DevEnvSyncSQLCommand to facilitate easier troubleshooting of search/replace issues.

Changelog Description

Added

  • Logging to the vip dev-env sync sql command

Pull request checklist

New release checklist

Steps to Test

Run vip dev-env sync sql with --debug=@automattic/vip:bin:dev-environment.

@sjinks sjinks requested a review from Copilot July 2, 2025 03:47
@sjinks sjinks self-assigned this Jul 2, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 2, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds debug logging to the DevEnvSyncSQLCommand to make troubleshooting search/replace steps easier.

  • Introduces a debug instance using debugLib
  • Logs the full network sites array with primary URL/domain
  • Logs the extracted site URLs after reading the dump
Comments suppressed due to low confidence (2)

src/commands/dev-env-sync-sql.ts:5

  • New debug logging was added; consider updating SETUP.md or other project documentation to explain how to enable and configure these debug logs for end users.
import debugLib from 'debug';

src/commands/dev-env-sync-sql.ts:355

  • [nitpick] Consider adding automated tests to cover these new debug logging paths to ensure they execute without errors and help detect any unexpected changes to the logging logic.
			debug( 'Extracted site URLs: %j', this.siteUrls );

@sjinks sjinks marked this pull request as ready for review July 2, 2025 04:18
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jul 2, 2025

@sjinks sjinks merged commit f5a15cb into trunk Jul 7, 2025
19 checks passed
@sjinks sjinks deleted the add/debug branch July 7, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants