Repository navigation
Remove unused startupComplete channel from the health cache - #7270
Merged
MarcosDY merged 1 commit intoSep 5, 2026
Merged
Conversation
The startupComplete channel is allocated in newCache but is never sent to or received from anywhere in the tree. It was added in 1328bd8 (spiffe#6164), a commit that introduced only its declaration and its initialization, so the field has been unused since it was added. The end of the startup phase is signalled by the local startSteadyStateHealthCheckCh in startRunner instead. Signed-off-by: Hajime Chan <[email protected]>
hajimeCha
requested review from
MarcosDY,
amartinezfayo,
evan2645,
rturner3 and
sorindumitru
as code owners
September 5, 2026 16:43
MarcosDY
enabled auto-merge
September 5, 2026 18:29
Manuthor
pushed a commit
to Manuthor/spire
that referenced
this pull request
Sep 11, 2026
) The startupComplete channel is allocated in newCache but is never sent to or received from anywhere in the tree. It was added in 1328bd8 (spiffe#6164), a commit that introduced only its declaration and its initialization, so the field has been unused since it was added. The end of the startup phase is signalled by the local startSteadyStateHealthCheckCh in startRunner instead. Signed-off-by: Hajime Chan <[email protected]>
Manuthor
pushed a commit
to Manuthor/spire
that referenced
this pull request
Sep 11, 2026
) The startupComplete channel is allocated in newCache but is never sent to or received from anywhere in the tree. It was added in 1328bd8 (spiffe#6164), a commit that introduced only its declaration and its initialization, so the field has been unused since it was added. The end of the startup phase is signalled by the local startSteadyStateHealthCheckCh in startRunner instead. Signed-off-by: Hajime Chan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request check list
Affected functionality
The health check subsystem (
pkg/common/health). There is no behavioral change.Description of change
cache.startupCompleteis allocated innewCache, but it is never sent to orreceived from anywhere in the tree. Its declaration and its initialization are
its only two occurrences:
It was added in 1328bd8 (#6164). That commit adds only those two lines — no read
or write of the channel was introduced along with it — so the field has been
unused since the moment it was added.
Removing it also removes a small source of confusion when reading this file. The
name reads as if it signalled the end of the startup phase, but that is actually
done by the local
startSteadyStateHealthCheckChinstartRunner(
cache.go:146,:177,:186).No tests are added, since this removes a field that nothing reads or writes;
there is no behavior to assert. Verification of that claim, on top of this
change:
go vet ./...passes over all 294 packages, including_test.gofiles. Sincea struct field that is still referenced anywhere would fail to compile once the
field is gone, this establishes that no reference remains.
_ = c.startupCompleteback into the package makes it fail with
c.startupComplete undefined (type *cache has no field or method startupComplete).go test ./pkg/common/health/... -count=1 -racepasses (18 tests).gofmt,go build ./...andmake lint-code(0 issues) are clean.Which issue this PR fixes
None.