pkg/kube: remove legacy import comments#31931
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes legacy Go import path comments from pkg/kube package files to eliminate inconsistent package import comments that can break downstream tooling (e.g., Kythe) in module-aware builds.
Changes:
- Removed
// import "helm.sh/helm/v4/pkg/kube"package import comments from multiplepkg/kube/*.gosource files. - Standardized
package kubedeclarations across the affected files to rely ongo.modas the canonical module path.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/kube/client.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/converter.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/factory.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/ready.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/resource.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/resource_policy.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/statuswait.go | Removes legacy import path comment from the package declaration. |
| pkg/kube/wait.go | Removes legacy import path comment from the package declaration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| */ | ||
|
|
||
| package kube // import "helm.sh/helm/v4/pkg/kube" | ||
| package kube |
There was a problem hiding this comment.
There are still legacy import path comments in this package’s *_test.go files (e.g., ready_test.go/resource_test.go/statuswait_test.go). If the goal is to eliminate package-level import comments from pkg/kube for consistency/tooling (Kythe), those should be removed as well so the package is consistently module-path-only across all files.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
Import path comments (e.g. `// import "helm.sh/helm/v4/pkg/kube"`) are a pre-Go modules convention no longer needed in module-aware builds. Some files in pkg/kube had these comments while others did not, causing inconsistency that triggered downstream Kythe indexing errors. Remove the import comments from all affected files to make the package declaration consistent across the directory. Fixes helm#31846 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: abhay1999 <[email protected]>
7831073 to
d7cdc9e
Compare
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]>
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]>
What
Import path comments (e.g.
// import "helm.sh/helm/v4/pkg/kube") are a pre-Go modules convention that is no longer needed in module-aware builds. Some files inpkg/kube/had these comments while others did not, causing inconsistency that triggered downstream Kythe indexing errors.Affected files:
pkg/kube/client.gopkg/kube/statuswait.gopkg/kube/ready.gopkg/kube/wait.gopkg/kube/resource.gopkg/kube/converter.gopkg/kube/factory.gopkg/kube/resource_policy.goWhy
Since Go 1.11 (modules), import path comments are redundant — the
go.modfile is the authoritative source for the module path. Having them in some files but not others within the same package causes inconsistency and breaks downstream static analysis tools like Kythe.Fixes #31846