Skip to content

[sig-migrate] Added multithreading support#369

Merged
ldmonster merged 10 commits into
mainfrom
sigmigrate-multithread
Jun 1, 2026
Merged

[sig-migrate] Added multithreading support#369
ldmonster merged 10 commits into
mainfrom
sigmigrate-multithread

Conversation

@Suselz
Copy link
Copy Markdown
Member

@Suselz Suselz commented May 26, 2026

Changes:

  • Added multithreading support
  • Thread-safe logging to a file has been implemented

Signed-off-by: suselz <suselz@mail.ru>
@Suselz Suselz self-assigned this May 26, 2026
@Suselz Suselz requested a review from ldmonster as a code owner May 26, 2026 12:41
@Suselz Suselz marked this pull request as draft May 26, 2026 12:41
Suselz added 2 commits May 26, 2026 19:28
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
@Suselz Suselz requested a review from AlwxSin May 27, 2026 14:52
AlwxSin
AlwxSin previously approved these changes May 29, 2026
@Suselz Suselz marked this pull request as ready for review June 1, 2026 13:15
ldmonster
ldmonster previously approved these changes Jun 1, 2026
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 enhances the d8 tools sig-migrate tool to support concurrent (multi-threaded) Kubernetes resource discovery and annotation, and introduces thread-safe writing of run artifacts (failed/error/skipped/trace logs) alongside new CLI knobs for tuning concurrency and measuring stage timings.

Changes:

  • Add a worker-pool based implementation for resource collection and annotation (--threads) plus retry logic for API calls.
  • Make file artifact writing thread-safe by reusing per-run writers with mutex protection.
  • Add optional stage timing output (--measure-stages) and update artifact file extensions/docs to .log.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.

File Description
internal/tools/sigmigrate/sigmigrate.go Implements worker pools, retry wrappers, thread-safe artifact writers, and new timing/progress logic.
internal/tools/sigmigrate/sigmigrate_test.go Updates tests for .log artifacts and adds coverage for worker normalization/retry/concurrent writes.
internal/tools/sigmigrate/README.md Updates documented artifact filenames/extensions to .log.
internal/tools/sigmigrate/cmd/flags.go Adds --threads and --measure-stages flags and centralizes the default --as value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/tools/sigmigrate/sigmigrate.go
Comment thread internal/tools/sigmigrate/sigmigrate.go Outdated
Comment thread internal/tools/sigmigrate/sigmigrate.go Outdated
Comment thread internal/tools/sigmigrate/sigmigrate.go
Comment thread internal/tools/sigmigrate/cmd/flags.go
Comment thread internal/tools/sigmigrate/sigmigrate.go
Comment thread internal/tools/sigmigrate/sigmigrate.go Outdated
Comment thread internal/tools/sigmigrate/sigmigrate.go Outdated
Comment thread internal/tools/sigmigrate/sigmigrate.go
Comment thread internal/tools/sigmigrate/cmd/flags.go
Suselz added 2 commits June 1, 2026 19:00
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
@Suselz Suselz dismissed stale reviews from ldmonster and AlwxSin via 01440d4 June 1, 2026 14:01
Suselz added 5 commits June 1, 2026 19:37
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
Signed-off-by: suselz <suselz@mail.ru>
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@ldmonster ldmonster merged commit 1eb3f13 into main Jun 1, 2026
6 checks passed
@ldmonster ldmonster added the enhancement New feature or request label Jun 1, 2026
@ldmonster ldmonster deleted the sigmigrate-multithread branch June 1, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants