Short Answer: It doesn't. PR #8627 does not modify go.sum or go.mod.
PR #8627 (“xdsclient: stop batching writes on the ADS stream”) only modified internal implementation files:
internal/xds/clients/internal/buffer/unbounded.gointernal/xds/clients/xdsclient/ads_stream.gointernal/xds/clients/xdsclient/channel.goNo dependency changes were made, so go.mod and go.sum remain unchanged.
If you see go.sum in the PR diff, it may be due to:
The go.sum file must be updated when:
When you add a new import that requires a package not already in go.mod:
import "github.com/new/package"
Run go mod tidy to update both go.mod and go.sum.
When explicitly updating a dependency version in go.mod:
require github.com/some/package v2.0.0 // updated from v1.0.0
Run go mod tidy to update go.sum with new checksums.
When removing code that was the last use of a dependency, run go mod tidy to clean up go.sum.
When updating a direct dependency that itself adds new dependencies, go.sum will include checksums for those transitive dependencies.
The go.sum file does NOT need to change when:
The go.sum file contains cryptographic checksums of the content of specific module versions. It ensures:
Each line in go.sum represents either:
go.mod file: <module> <version>/go.mod h1:<hash><module> <version> h1:<hash>When dependencies change, always run:
go mod tidy
This command:
go.sum with all necessary checksumsgo.mod formattinggRPC-Go is a multi-module repository with several go.mod files:
/go.mod and /go.sum/examples/go.mod and /examples/go.sum/security/advancedtls/go.mod and /security/advancedtls/go.sumA PR may need to update go.sum in multiple modules if changes affect multiple modules.
To verify if go.sum is correct and up-to-date:
go mod tidy git diff go.sum
If git diff shows no changes, your go.sum is already correct.
For PR #8627 specifically:
go.sum correctly remained unchangedIf you see go.sum in the diff, it's a display artifact, not an actual change.