Skip to content

Stop .gitignore excluding two vendored source files - #92

Merged
frobware merged 1 commit into
openshift:mainfrom
frobware:vendor-gitignore
Aug 26, 2026
Merged

Stop .gitignore excluding two vendored source files#92
frobware merged 1 commit into
openshift:mainfrom
frobware:vendor-gitignore

Conversation

@frobware

Copy link
Copy Markdown
Contributor

go tool kustomize has never built in this tree, which takes make install, make deploy and make bundle with it. On main:

$ go tool kustomize build config/default
# golang.org/x/text/cases
vendor/golang.org/x/text/cases/map.go:46:23: undefined: language.NewCoverage
vendor/golang.org/x/text/cases/map.go:52:21: undefined: language.Coverage

The cause is a .gitignore pattern of coverage.* with no leading slash, which git matches at any depth. It silently excluded vendor/golang.org/x/text/language/coverage.go and vendor/golang.org/x/text/internal/language/coverage.go, neither of which has ever been tracked, so go mod vendor writes them and git add skips 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 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.

Test plan

go tool kustomize build config/default exits 1 on main with 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, which go mod vendor writes and nothing needs, so it now shows as untracked. make verify-vendor compares tracked files and is unaffected.

This is the same commit carried in #84 and #91; both can drop their copy once this lands.

`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.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci

openshift-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9cd441f0-6b55-4b9c-9ca2-852c62855d1f

📥 Commits

Reviewing files that changed from the base of the PR and between dc69c98 and 6c37803.

⛔ Files ignored due to path filters (2)
  • vendor/golang.org/x/text/internal/language/coverage.go is excluded by !**/vendor/**, !vendor/**
  • vendor/golang.org/x/text/language/coverage.go is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (1)
  • .gitignore

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The .gitignore file clarifies coverage artifact comments. The coverage.* pattern is changed to /coverage.*, so it matches coverage artifacts in the repository root. The *.out pattern remains unchanged.

Merge Risk: ⚪ Minimal · up to 6c378

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)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: updating .gitignore so that two vendored source files are no longer excluded.
Description check ✅ Passed The description explains the .gitignore cause, the two missing vendored files, the build failure, the fix, and the test results.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PASS: The pull request changes only .gitignore and adds two vendored Go source files. The parent-to-HEAD patch contains no Ginkgo test declarations or test-title edits. Therefore, it introduces no u…
Test Structure And Quality ✅ Passed PASS: The pull request changes only .gitignore and two vendored Go source files. The diff contains no Ginkgo test code, cluster operations, setup or cleanup blocks, waits, or assertions. The test-st…
Microshift Test Compatibility ✅ Passed PASS: The pull request changes .gitignore and adds two vendored Go source files. The committed diff contains no new Ginkgo e2e tests or other test additions, so the MicroShift API and feature compat…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS — The pull request adds no Ginkgo e2e tests. The exact commit changes .gitignore and adds two vendored Go source files only. Therefore, the SNO multi-node compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PASS — The pull request changes only .gitignore and adds two vendored golang.org/x/text source files. The commit does not add or modify deployment manifests, operator code, controllers, or schedul…
Ote Binary Stdout Contract ✅ Passed PASS. The commit changes only .gitignore and adds two vendored golang.org/x/text library files. The added files contain no main, init, suite setup, stdout write, or logging call. Their `fmt.Sp…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The pull request changes .gitignore and adds two vendored Go library source files. The diff adds no Ginkgo e2e tests, test declarations, external hosts, or networking code. The IPv6 and discon…
No-Weak-Crypto ✅ Passed PASS. The commit changes .gitignore and adds two golang.org/x/text language-coverage files. The exact diff contains no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage, no custom cryptography, an…
Container-Privileges ✅ Passed PASS. The pull request changes only .gitignore and adds two Go source files under vendor/golang.org/x/text. It does not add or modify a container or Kubernetes manifest. The added lines contain no…
No-Sensitive-Data-In-Logs ✅ Passed PASS — The pull request changes only .gitignore and adds two vendored Go coverage source files. The added files contain no logging calls or output of passwords, tokens, API keys, PII, session IDs, h…
Full details: Docstring Coverage

Explanation

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 Names

Explanation

PASS: The pull request changes only .gitignore and adds two vendored Go source files. The parent-to-HEAD patch contains no Ginkgo test declarations or test-title edits. Therefore, it introduces no unstable or overly specific test names.

Full details: Test Structure And Quality

Explanation

PASS: The pull request changes only .gitignore and two vendored Go source files. The diff contains no Ginkgo test code, cluster operations, setup or cleanup blocks, waits, or assertions. The test-structure check is therefore not applicable.

Full details: Microshift Test Compatibility

Explanation

PASS: The pull request changes .gitignore and adds two vendored Go source files. The committed diff contains no new Ginkgo e2e tests or other test additions, so the MicroShift API and feature compatibility check does not apply.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS — The pull request changes only .gitignore and adds two vendored golang.org/x/text source files. The commit does not add or modify deployment manifests, operator code, controllers, or scheduling constraints. The topology-aware scheduling check is therefore not applicable.

Full details: Ote Binary Stdout Contract

Explanation

PASS. The commit changes only .gitignore and adds two vendored golang.org/x/text library files. The added files contain no main, init, suite setup, stdout write, or logging call. Their fmt.Sprintf call is only an argument to panic. No OTE identifiers or process-level output changes appear in the repository diff.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

PASS: The pull request changes .gitignore and adds two vendored Go library source files. The diff adds no Ginkgo e2e tests, test declarations, external hosts, or networking code. The IPv6 and disconnected-network check is not applicable.

Full details: No-Weak-Crypto

Explanation

PASS. The commit changes .gitignore and adds two golang.org/x/text language-coverage files. The exact diff contains no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage, no custom cryptography, and no secret/token comparison logic. The added Go files import only fmt, sort, and the internal language package.

Full details: Container-Privileges

Explanation

PASS. The pull request changes only .gitignore and adds two Go source files under vendor/golang.org/x/text. It does not add or modify a container or Kubernetes manifest. The added lines contain none of the flagged settings: privileged: true, host PID/network/IPC, SYS_ADMIN, allowPrivilegeEscalation: true, or an unjustified root configuration.

Full details: No-Sensitive-Data-In-Logs

Explanation

PASS — The pull request changes only .gitignore and adds two vendored Go coverage source files. The added files contain no logging calls or output of passwords, tokens, API keys, PII, session IDs, hostnames, or customer data. The only formatting call is fmt.Sprintf inside a panic message for an unsupported type, not logging.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2026
@frobware
frobware requested a review from alebedev87 August 26, 2026 12:12
@openshift-ci

openshift-ci Bot commented Aug 26, 2026

Copy link
Copy Markdown

@frobware: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@frobware
frobware merged commit 47910ea into openshift:main Aug 26, 2026
10 of 11 checks passed
@frobware
frobware deleted the vendor-gitignore branch August 26, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant