Automattic / vip-cli

The VIP-CLI
https://docs.wpvip.com/vip-cli/
MIT License
58 stars 17 forks source link

SQL Import: Switch to wpSitesSDS query #1975

Closed mjangda closed 3 months ago

mjangda commented 3 months ago

The wpSites query is the legacy one which relies on WP REST API + Jetpack-based lookups and can fail more often than not. When it does fail, it fails to kick off the import as the API returns a partial error and the CLI takes that as a complete failure.

{
    "errors": [
        {
            "message": "Not Found",
            "locations": [
                {
                    "line": 24,
                    "column": 5
                }
            ],
            "path": [
                "apps",
                "edges",
                0,
                "environments",
                2,
                "wpSites"
            ],
            "extensions": {
                "code": "wpsites-error"
            },

The SDS one uses the newer and more reliable Site Details Service data. They're interchangeable so no other changes are necessary.

Pull request checklist

New release checklist

Steps to Test

  1. Check out PR.
  2. Run npm run build
  3. Run ./dist/bin/vip-import-sql.js 309 file.sql
  4. Verify import runs without issue.
github-actions[bot] commented 3 months ago

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud