Skip to content

fix(repo): progressive logging for parallel operations#57

Merged
rios0rios0 merged 3 commits intomainfrom
fix/progressive-logging-parallel-ops
Apr 2, 2026
Merged

fix(repo): progressive logging for parallel operations#57
rios0rios0 merged 3 commits intomainfrom
fix/progressive-logging-parallel-ops

Conversation

@rios0rios0
Copy link
Copy Markdown
Owner

Summary

  • Moved per-repo log calls from post-wg.Wait() loops into goroutines so results stream to the terminal as each repo completes
  • Previously, all 6 parallel operations (sync, prune, fork-sync, failover, mirror, restore) appeared frozen until every repo finished, then dumped all logs at once
  • Post-Wait loops now only compute summary counters; the summary log remains at the end

Test plan

  • make build compiles successfully
  • All tests pass (go test ./...)
  • Run dev repo sync ~/Development/github.com/rios0rios0 and verify logs stream progressively

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 2, 2026 04:12
@claude
Copy link
Copy Markdown

claude bot commented Apr 2, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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

This PR improves UX for parallel repo operations by emitting per-repo result logs as each goroutine completes, instead of buffering logs until after wg.Wait().

Changes:

  • Moved per-repo “result” log lines into the worker goroutines for sync/restore/prune/mirror/fork-sync/failover.
  • Simplified the post-wg.Wait() loops to only compute summary counters (summary log still emitted at the end).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/repo/sync.go Logs each sync result as the repo finishes; end loop now only computes summary counts.
internal/repo/restore.go Streams restore results progressively from goroutines; keeps final aggregate summary.
internal/repo/prune.go Streams prune results progressively (only for deletions/failures); summary loop left for counters.
internal/repo/mirror.go Streams mirror outcomes progressively during parallel mirroring; preserves final counts.
internal/repo/fork_sync.go Streams fork-sync results from parallelForkSync goroutines; summary function now only aggregates.
internal/repo/failover.go Streams failover results progressively; keeps final aggregate summary.

…dback

- moved per-repo log calls from post-`wg.Wait()` loops into goroutines so
  results appear as each repo completes, instead of all at once at the end
- applied to all 6 batch-logging operations: sync, prune, fork-sync, failover,
  mirror, and restore
- post-Wait loops now only compute summary counters
- logrus mutex ensures thread-safe concurrent writes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rios0rios0 rios0rios0 force-pushed the fix/progressive-logging-parallel-ops branch from 83c085c to d8c1b79 Compare April 2, 2026 14:55
rios0rios0 and others added 2 commits April 2, 2026 14:42
…ure detection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@rios0rios0 rios0rios0 merged commit 5286aca into main Apr 2, 2026
20 checks passed
@rios0rios0 rios0rios0 deleted the fix/progressive-logging-parallel-ops branch April 2, 2026 17:51
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