Skip to content

pkg/kube: remove legacy import comments from test files#31932

Merged
gjenkins8 merged 1 commit into
helm:mainfrom
TerryHowe:fix/remove-legacy-import-comments-test-files
Mar 12, 2026
Merged

pkg/kube: remove legacy import comments from test files#31932
gjenkins8 merged 1 commit into
helm:mainfrom
TerryHowe:fix/remove-legacy-import-comments-test-files

Conversation

@TerryHowe

Copy link
Copy Markdown
Contributor

What

Remove pre-Go modules import path comments from pkg/kube test files:

  • pkg/kube/ready_test.go
  • pkg/kube/resource_test.go
  • pkg/kube/statuswait_test.go

Why

Follow-up to #31931 which addressed the non-test files. As noted in this Copilot review comment, the *_test.go files in pkg/kube still had legacy import path comments. Since Go 1.11 (modules), these comments are redundant — the go.mod file is authoritative. Removing them from test files ensures consistency across the entire package.

Addresses: #31931 (comment)

Remove pre-Go modules import path comments from pkg/kube test files
(ready_test.go, resource_test.go, statuswait_test.go) for consistency
with the rest of the package.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
Copilot AI review requested due to automatic review settings March 12, 2026 12:12
@pull-request-size pull-request-size Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes legacy pre-Go-modules import path comments from remaining pkg/kube test files to align with the rest of the package and avoid tooling inconsistencies.

Changes:

  • Remove // import "helm.sh/helm/v4/pkg/kube" import path comments from pkg/kube *_test.go files.
  • Standardize test file package kube declarations to match module-based builds.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/kube/statuswait_test.go Drops legacy import path comment from the package declaration.
pkg/kube/resource_test.go Drops legacy import path comment from the package declaration.
pkg/kube/ready_test.go Drops legacy import path comment from the package declaration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

abhay1999 added a commit to abhay1999/helm that referenced this pull request Mar 12, 2026
Pre-Go-modules import path comments (e.g. `// import "helm.sh/helm/v4/..."`)
are obsolete since Go 1.11 where go.mod is the authoritative module path.
These stale comments cause issues with downstream tooling such as Kythe.

Removes the legacy import comments from 64 files across 20 packages:
- cmd/helm
- internal/chart/v3/lint and sub-packages
- internal/plugin and sub-packages
- internal/release/v2/util
- pkg/chart/v2/lint and sub-packages
- pkg/cmd, pkg/engine, pkg/ignore, pkg/provenance
- pkg/registry
- pkg/release/v1/util
- pkg/repo/v1
- pkg/storage and pkg/storage/driver

Follows up on helm#31931 and helm#31932 which addressed pkg/kube.

Fixes helm#31846

Signed-off-by: abhay1999 <[email protected]>
Signed-off-by: abhay1999 <[email protected]>
@gjenkins8
gjenkins8 merged commit d3df72e into helm:main Mar 12, 2026
9 checks passed
TerryHowe pushed a commit that referenced this pull request Jul 18, 2026
Pre-Go-modules import path comments (e.g. `// import "helm.sh/helm/v4/..."`)
are obsolete since Go 1.11 where go.mod is the authoritative module path.
These stale comments cause issues with downstream tooling such as Kythe.

Removes the legacy import comments from 64 files across 20 packages:
- cmd/helm
- internal/chart/v3/lint and sub-packages
- internal/plugin and sub-packages
- internal/release/v2/util
- pkg/chart/v2/lint and sub-packages
- pkg/cmd, pkg/engine, pkg/ignore, pkg/provenance
- pkg/registry
- pkg/release/v1/util
- pkg/repo/v1
- pkg/storage and pkg/storage/driver

Follows up on #31931 and #31932 which addressed pkg/kube.

Fixes #31846

Signed-off-by: abhay1999 <[email protected]>
Signed-off-by: abhay1999 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants