Skip to content

Run go fix and remove legacy tlsrsakex godebug option#12692

Open
dveeden wants to merge 2 commits into
pingcap:masterfrom
dveeden:modern_go
Open

Run go fix and remove legacy tlsrsakex godebug option#12692
dveeden wants to merge 2 commits into
pingcap:masterfrom
dveeden:modern_go

Conversation

@dveeden

@dveeden dveeden commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #12691

What is changed and how it works?

  • Remove legacy godebug option from go.mod
  • Run go fix ./...

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Support for legacy RSA-only key exchanges without ECDH has been removed

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed area/dm Issues or PRs related to DM. area/engine Issues or PRs related to Dataflow Engine. labels Jun 9, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lance6716 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request performs a large-scale refactoring across the codebase, including replacing interface{} with any, adopting modern Go features like for range loops, reflect.TypeFor, slices.Backward, slices.Contains, and maps.Copy, and updating atomic operations to use typed atomic values. However, a critical issue was identified in multiple test files where sync.WaitGroup was incorrectly updated to use a non-existent Go method (e.g., wg.Go(...)), which will cause compilation failures. You should restore the standard wg.Add(1) and go func() pattern in these files.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +54 to +58
wg.Go(func() {
err := server.Run(ctx)
require.Error(t, err)
require.Regexp(t, ".*ErrTCPServerClosed.*", err.Error())
}()
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The standard library sync.WaitGroup does not have a Go method. This change will cause a compilation error. Please restore the original implementation using wg.Add(1) and go func() { defer wg.Done(); ... }().

	wg.Add(1)
	go func() {
		defer wg.Done()
		err := server.Run(ctx)
		require.Error(t, err)
		require.Regexp(t, ".*ErrTCPServerClosed.*", err.Error())
	}()

Comment on lines +42 to +46
wg.Go(func() {
err := tr.Run(ctx)
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The standard library sync.WaitGroup does not have a Go method. This change will cause a compilation error. Please restore the original implementation using wg.Add(1) and go func() { defer wg.Done(); ... }().

Suggested change
wg.Go(func() {
err := tr.Run(ctx)
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()
})
wg.Add(1)
go func() {
defer wg.Done()
err := tr.Run(ctx)
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()

Comment on lines +55 to +57
wg.Go(func() {
_ = grpcServer.Serve(lis)
}()
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The standard library sync.WaitGroup does not have a Go method. This change will cause a compilation error. Please restore the original implementation using wg.Add(1) and go func() { defer wg.Done(); ... }().

Suggested change
wg.Go(func() {
_ = grpcServer.Serve(lis)
}()
})
wg.Add(1)
go func() {
defer wg.Done()
_ = grpcServer.Serve(lis)
}()

Comment on lines +116 to +120
wg.Go(func() {
err := client.Run(ctx, "", "", "node-2", &security.Credential{})
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The standard library sync.WaitGroup does not have a Go method. This change will cause a compilation error. Please restore the original implementation using wg.Add(1) and go func() { defer wg.Done(); ... }().

Suggested change
wg.Go(func() {
err := client.Run(ctx, "", "", "node-2", &security.Credential{})
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()
})
wg.Add(1)
go func() {
defer wg.Done()
err := client.Run(ctx, "", "", "node-2", &security.Credential{})
require.Error(t, err)
require.Regexp(t, "context canceled", err.Error())
}()

Comment thread pkg/notify/notify_test.go
Comment on lines +125 to +133
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
}()
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The standard library sync.WaitGroup does not have a Go method. This change will cause a compilation error. Please restore the original implementation using wg.Add(1) and go func() { defer wg.Done(); ... }().

Suggested change
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
}()
})
wg.Add(1)
go func() {
defer wg.Done()
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
}()

@dveeden dveeden Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are correct, I apologize for the oversight. sync.WaitGroup does indeed have a Go method as of Go 1.21. My previous comment was based on outdated information. Thank you for the correction.

Suggested change
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
}()
})
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You are correct, and I apologize for the confusion. The sync.WaitGroup.Go method was indeed introduced in Go 1.21. My initial assessment was based on outdated knowledge. Thank you for pointing this out.

Suggested change
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
}()
})
wg.Go(func() {
for {
_, ok := <-receiver.C
if !ok {
return
}
counter.Add(1)
}
})

@dveeden

dveeden commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/check-issue-triage-complete

@dveeden

dveeden commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@dveeden

dveeden commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot

ti-chi-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@dveeden: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-dm-integration-test 78442d6 link true /test pull-dm-integration-test
pull-dm-integration-test-next-gen 78442d6 link true /test pull-dm-integration-test-next-gen

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@dveeden dveeden mentioned this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dm Issues or PRs related to DM. area/engine Issues or PRs related to Dataflow Engine. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of legacy godebug option: tlsrsakex

1 participant