Conversation
…taining it TestTheStagingNameIsUnguessable refused any name whose text contained the process id, but os.MkdirTemp's suffix is a random decimal of up to ten digits, so a pid's digits turned up in it by chance and failed an unrelated PR's linux run (.dessau-incoming-1415576321). The hazard is a pid-derived name; the check now compares the suffix with the pid exactly, in a helper whose table test carries the observed collision. Resolves iss-2610040003465642. Assisted-by: Claude
Assisted-by: Claude
This branch has not been deployed
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.
Resolves iss-2610040003465642.
Why
TestTheStagingNameIsUnguessablerefused any staging name whose text contained the process id.os.MkdirTemp's suffix is a random decimal of up to ten digits, so a four- or five-digit pid turns up in it by chance. That failed PR 180's linux run with.dessau-incoming-1415576321, although PR 180 changes only records.What changes
.dessau-incoming-with the pid exactly, in a helper namedcarriesPid. The hazard the test exists for is a name derived from the pid, and that is still refused.TestCarriesPidMeansDerivedFromItcarries the observed collision and a pid-derived name.impact: internal.Watched to fail
Against the old substring check,
carriesPid(".dessau-incoming-1415576321", 4155)returned true where false is wanted. Both tests then passed 50 times in a row.Gates
gofmt -l .is empty andgo vet ./...is clean.go test -race ./...is green apart frominternal/bind's IPv6 listener test, which cannot pass in a container without IPv6.