Repository navigation
test: the peer cache in the stale-disk warm test carries the peer token - #765
Merged
Merged
Conversation
…en, as the proxy configures it The test gave the proxy a peer token but built its peer cache without one. Any request the peer cache sent itself (a get or push for a key the fake peer owns on the hash ring, which depends on the random test port) reached the fake peer with no token and failed the test. cmd/proxy sets the same token on both, so the test now does too.
Contributor
PR Quality ReportCompared against base branch Coverage and tests
Compatibility
Performance smokeLower CPU cost (
State
|
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.
Summary
TestLabelSurface_LabelValuesIndexStartupWarmsFromPeersWhenDiskStalefailed once in release validation withunexpected peer token header: got "".The test gives the proxy
PeerAuthToken: "shared-secret"but builds the peer cache withoutAuthToken. Requests the proxy sends itself carry the token. Requests the peer cache sends on its own (a get or push for a key that the fake peer owns on the hash ring) did not. Ownership depends on the random httptest port, so the test failed only sometimes.cmd/proxysets the same token on both (cache.PeerConfig.AuthToken: cfg.peerAuthToken). The test now does the same. Test-only change; no behaviour change.Test plan
go test -short -p 1 -race -count=50 -run TestLabelSurface_LabelValuesIndexStartupWarms ./internal/proxy/passes