Skip to content

remove legacy import comments from remaining packages#31933

Merged
TerryHowe merged 1 commit into
helm:mainfrom
abhay1999:remove-legacy-import-comments
Jul 18, 2026
Merged

remove legacy import comments from remaining packages#31933
TerryHowe merged 1 commit into
helm:mainfrom
abhay1999:remove-legacy-import-comments

Conversation

@abhay1999

Copy link
Copy Markdown
Contributor

Problem

Pre-Go-modules import path comments (e.g. // import "helm.sh/helm/v4/...") are obsolete since Go 1.11 introduced go.mod as the authoritative module path source. These stale comments cause downstream tooling issues — specifically breaking Kythe indexing (as reported in #31846).

Solution

Remove the // import "..." comments from 64 files across 20 packages that were missed in #31931 and #31932:

  • 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

Related

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]>
Copilot AI review requested due to automatic review settings March 12, 2026 12:54
@pull-request-size pull-request-size Bot added the size/L Denotes a PR that changes 100-499 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

This PR removes Go “import comments” (canonical import path annotations) from package declarations across several Helm v4 packages, relying on the module path in go.mod instead.

Changes:

  • Removed // import "helm.sh/helm/v4/..." package import comments from multiple pkg/*, internal/*, and cmd/helm files.
  • Applied the same cleanup to corresponding _test.go and doc.go files to keep per-package declarations consistent.

Reviewed changes

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

Show a summary per file
File Description
pkg/storage/storage.go Removes package import comment from storage package declaration.
pkg/storage/storage_test.go Removes package import comment from storage tests.
pkg/storage/driver/util.go Removes package import comment from driver package declaration.
pkg/storage/driver/sql.go Removes package import comment from driver package declaration.
pkg/storage/driver/secrets.go Removes package import comment from driver package declaration.
pkg/storage/driver/records.go Removes package import comment from driver package declaration.
pkg/storage/driver/records_test.go Removes package import comment from driver tests.
pkg/storage/driver/mock_test.go Removes package import comment from driver tests.
pkg/storage/driver/labels_test.go Removes package import comment from driver tests.
pkg/storage/driver/driver.go Removes package import comment from driver package declaration.
pkg/storage/driver/cfgmaps.go Removes package import comment from driver package declaration.
pkg/repo/v1/repo.go Removes package import comment from repo package declaration.
pkg/repo/v1/chartrepo.go Removes package import comment from repo package declaration.
pkg/release/v1/util/sorter.go Removes package import comment from util package declaration.
pkg/release/v1/util/sorter_test.go Removes package import comment from util tests.
pkg/release/v1/util/manifest_test.go Removes package import comment from util tests.
pkg/release/v1/util/filter.go Removes package import comment from util package declaration.
pkg/release/v1/util/filter_test.go Removes package import comment from util tests.
pkg/registry/tag.go Removes package import comment from registry package declaration.
pkg/registry/constants.go Removes package import comment from registry package declaration.
pkg/registry/client.go Removes package import comment from registry package declaration.
pkg/registry/chart.go Removes package import comment from registry package declaration.
pkg/registry/chart_test.go Removes package import comment from registry tests.
pkg/provenance/doc.go Removes package import comment from provenance package declaration.
pkg/ignore/doc.go Removes package import comment from ignore package declaration.
pkg/engine/doc.go Removes package import comment from engine package declaration.
pkg/cmd/root.go Removes package import comment from cmd package declaration.
pkg/chart/v2/lint/support/doc.go Removes package import comment from support package declaration.
pkg/chart/v2/lint/rules/deprecations.go Removes package import comment from rules package declaration.
pkg/chart/v2/lint/rules/deprecations_test.go Removes package import comment from rules tests.
pkg/chart/v2/lint/rules/dependencies.go Removes package import comment from rules package declaration.
pkg/chart/v2/lint/rules/chartfile.go Removes package import comment from rules package declaration.
pkg/chart/v2/lint/lint.go Removes package import comment from lint package declaration.
internal/release/v2/util/sorter.go Removes package import comment from internal util package declaration.
internal/release/v2/util/sorter_test.go Removes package import comment from internal util tests.
internal/release/v2/util/manifest.go Removes package import comment from internal util package declaration.
internal/release/v2/util/manifest_test.go Removes package import comment from internal util tests.
internal/release/v2/util/manifest_sorter.go Removes package import comment from internal util package declaration.
internal/release/v2/util/manifest_sorter_test.go Removes package import comment from internal util tests.
internal/release/v2/util/kind_sorter.go Removes package import comment from internal util package declaration.
internal/release/v2/util/kind_sorter_test.go Removes package import comment from internal util tests.
internal/release/v2/util/filter.go Removes package import comment from internal util package declaration.
internal/release/v2/util/filter_test.go Removes package import comment from internal util tests.
internal/plugin/runtime_subprocess_hooks.go Removes package import comment from internal plugin package declaration.
internal/plugin/plugin.go Removes package import comment from internal plugin package declaration.
internal/plugin/installer/vcs_installer.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/vcs_installer_test.go Removes package import comment from internal installer tests.
internal/plugin/installer/oci_installer_test.go Removes package import comment from internal installer tests.
internal/plugin/installer/local_installer.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/local_installer_test.go Removes package import comment from internal installer tests.
internal/plugin/installer/http_installer.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/http_installer_test.go Removes package import comment from internal installer tests.
internal/plugin/installer/extractor.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/doc.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/base.go Removes package import comment from internal installer package declaration.
internal/plugin/installer/base_test.go Removes package import comment from internal installer tests.
internal/plugin/cache/cache.go Removes package import comment from internal cache package declaration.
internal/chart/v3/lint/support/doc.go Removes package import comment from internal support package declaration.
internal/chart/v3/lint/rules/deprecations.go Removes package import comment from internal rules package declaration.
internal/chart/v3/lint/rules/deprecations_test.go Removes package import comment from internal rules tests.
internal/chart/v3/lint/rules/dependencies.go Removes package import comment from internal rules package declaration.
internal/chart/v3/lint/rules/chartfile.go Removes package import comment from internal rules package declaration.
internal/chart/v3/lint/lint.go Removes package import comment from internal lint package declaration.
cmd/helm/helm.go Removes package import comment from main package declaration.

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

@abhay1999

Copy link
Copy Markdown
Contributor Author

Hi maintainers! 👋 Following up on this PR — it's been 21 days with no human review.

This removes legacy // import "..." comments from remaining packages in the codebase (a continuation of the cleanup started in earlier PRs). It's a pure refactor with no functional changes and all CI is green. Would appreciate a review when you have bandwidth. Happy to squash or rebase if needed. Thanks!

@abhay1999

Copy link
Copy Markdown
Contributor Author

Hi maintainers, gentle reminder on this PR when you have a chance.

@gjenkins8 gjenkins8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please e.g. rebase to re-run CI and I can re-approve. Thanks!

@gjenkins8 gjenkins8 added Has One Approval This PR has one approval. It still needs a second approval to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 18, 2026
@TerryHowe TerryHowe closed this Jul 18, 2026
@TerryHowe TerryHowe reopened this Jul 18, 2026

@TerryHowe TerryHowe 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.

/lgtm

@TerryHowe
TerryHowe merged commit 82be04d into helm:main Jul 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Has One Approval This PR has one approval. It still needs a second approval to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Go pkg import comment causing downstream processing error (kythe)

4 participants