Skip to content

feat: db push transport + progress polish (large-DB feedback #13–#15)#5

Merged
vikasiwp merged 2 commits into
mainfrom
fix/cli-db-push-transport-progress
Jun 25, 2026
Merged

feat: db push transport + progress polish (large-DB feedback #13–#15)#5
vikasiwp merged 2 commits into
mainfrom
fix/cli-db-push-transport-progress

Conversation

@vikasiwp

Copy link
Copy Markdown
Contributor

Round-3 feedback from a 166 MB full-parity db push (completed correctly in 144s). The transform logic (prefix rewrite, role/cap remap, guid-skip, backup-first, failure-path output) held up at 250× the original test size — it's the transport + progress that needed polish. All findings were verified against commands/db.ts + lib/ssh-connection.ts.

Changes

# Sev Fix
13 Med (perf) scp now uploads with -C (lib/ssh-connection.tsscpArgs). The dump was transferred uncompressed; SQL compresses ~5–10×, so this cuts a large share of upload time on big dumps. Applies to every scp upload (db push, plugin zip).
14 Med (UX) Progress in non-TTY contexts. ora spinners are suppressed when stdout isn't a TTY, so piped/CI/background pushes printed nothing for 144s (looked hung). spinner() now returns a stub that emits one-line phase markers to stderr (Backing up… / Uploading… / Importing… / Rewriting URLs…). Kept silent in --json/INSTAWP_QUIET; stdout + the final summary stay clean for capture.
15 Low Timing in the summarydb push now reports elapsed: 144s (1.2 MB/s).

Deferred — #16 (misc, larger surface)

Left for a follow-up; noted so it's not lost:

  • search-replace table scoping--all-tables scans every row even when the bulk (e.g. ~197K postmeta) has no URLs. Would need an opt-in table filter.
  • post-push readiness — the site briefly returned 000 right after import+flush; an optional --verify curl-with-retry (or a "large imports need a moment" note) would set expectations.
  • backup retention — every push leaves ~/db-backup-*.sql.gz; a db backups list/prune verb would manage accumulation.

Tests

  • New: scpUpload asserts -C; spinner() emits a stderr marker in non-TTY and stays silent in JSON mode.
  • Full suite green (332 passing); tsc clean.

Builds on the merged round-1/2 work (#1–#12, shipped in 0.0.1-beta.24).

🤖 Generated with Claude Code

…-#15)

From a 166 MB full-parity push (round 3):
- #13 scp uploads with -C (compress in transit); SQL compresses ~5-10x
- #14 non-TTY runs (pipe/CI/background) emit one-line phase markers to stderr
  instead of going silent for the whole push (ora spinners are TTY-only)
- #15 db push summary reports elapsed time + throughput (e.g. "144s (1.2 MB/s)")

#16 (search-replace table scoping, --verify readiness check, backup retention)
deferred — larger/new surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

Finalize CHANGELOG header + bump for db push transport/progress polish
(scp -C compression, non-TTY phase markers, elapsed/throughput in summary).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vikasiwp vikasiwp merged commit 45dba8d into main Jun 25, 2026
1 check failed
@claude

claude Bot commented Jun 25, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

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