Stop .gitignore excluding two vendored source files - #92
Conversation
`go tool kustomize` has never built in this tree: vendor/golang.org/x/text/cases/map.go:46:23: undefined: language.NewCoverage which takes make install, make deploy and make bundle with it. Nothing in the main module imports x/text/cases, so go build ./... and the unit jobs are unaffected and it only shows up when a tool needs it. The cause is here rather than in the dependency. A gitignore pattern with no slash in it matches at every depth, so "coverage.*", meant for `go test -coverprofile` output at the root, also matched vendor/golang.org/x/text/language/coverage.go vendor/golang.org/x/text/internal/language/coverage.go Neither has ever been tracked: go mod vendor wrote them, git add skipped them without comment, and every clone since has had an x/text/language missing the file that defines Coverage, NewCoverage and BaseLanguages. Anchoring the pattern is the fix, and the two files come back with it. Checked the rest of the tree the same way: comparing every vendored package against the module cache turns up 423 files absent from vendor, and only these two are excluded by a gitignore rule and needed to build. The others are //go:build ignore generators that go mod vendor correctly omits, or files it never copies. profile.cov on the next line has the same shape and no casualties today, so it is left alone.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Merge Risk: ⚪ Minimal · up to The change anchors the ignore pattern and restores the vendored files needed for the Go and Kustomize builds; it is localized and no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) Full details: Stable And Deterministic Test NamesExplanation PASS: The pull request changes only Full details: Test Structure And QualityExplanation PASS: The pull request changes only Full details: Microshift Test CompatibilityExplanation PASS: The pull request changes Full details: Topology-Aware Scheduling CompatibilityExplanation PASS — The pull request changes only Full details: Ote Binary Stdout ContractExplanation PASS. The commit changes only Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS: The pull request changes Full details: No-Weak-CryptoExplanation PASS. The commit changes Full details: Container-PrivilegesExplanation PASS. The pull request changes only Full details: No-Sensitive-Data-In-LogsExplanation PASS — The pull request changes only ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@frobware: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
go tool kustomizehas never built in this tree, which takesmake install,make deployandmake bundlewith it. Onmain:The cause is a
.gitignorepattern ofcoverage.*with no leading slash, which git matches at any depth. It silently excludedvendor/golang.org/x/text/language/coverage.goandvendor/golang.org/x/text/internal/language/coverage.go, neither of which has ever been tracked, sogo mod vendorwrites them andgit addskips them.Anchoring the pattern is the fix, and the two files come back with it. Checked the rest of the tree the same way: comparing every vendored package against the module cache turns up 423 files absent from vendor, and only these two are both excluded by a gitignore rule and needed to build. The others are
//go:build ignoregenerators thatgo mod vendorcorrectly omits, or files it never copies.profile.covon the next line has the same shape and no casualties today, so it is left alone.Test plan
go tool kustomize build config/defaultexits 1 onmainwith the error above and exits 0 with this commit.go build ./...passes.One visible consequence: anchoring the pattern un-ignores
vendor/github.com/emicklei/go-restful/v3/coverage.sh, whichgo mod vendorwrites and nothing needs, so it now shows as untracked.make verify-vendorcompares tracked files and is unaffected.This is the same commit carried in #84 and #91; both can drop their copy once this lands.