Skip to content

Module Path Lacks /v4 Suffix Despite v4.x Releases, Causing Go Module Compatibility Issues #645

@uneet7

Description

@uneet7

The repository has released versions up to v4.x (e.g., v4.8.1), but the go.mod file still specifies the module path as:​

module github.com/kubernetes-csi/external-attacher

According to Go's module versioning guidelines, modules with major versions v2 and above should include the major version in the module path (e.g., github.com/kubernetes-csi/external-attacher/v4).​

This discrepancy leads to issues when using Go tooling. For instance, running:​

go get github.com/kubernetes-csi/[email protected]

results in errors or unexpected behavior because the module path doesn't match the versioned import path expected by Go. PFA attached screenshot below

Image

This affects developers who rely on tooling related to Go proxy to automate their go module upgrades, as it complicates the process of fetching and integrating the latest versions of external-attacher.​

Proposed Solution

To align with Go's module versioning requirements and ensure compatibility:​

  1. Update the Module Path: Modify the go.mod file to reflect the major version, changing the module path to:​

    module github.com/kubernetes-csi/external-attacher/v4

  2. Adjust Import Paths: Update all internal and external import paths within the repository to use the new module path with the /v4 suffix.​

  3. Tag a New Release: After making these changes, tag a new release (e.g., v4.8.2) to provide a clear version point for users.​

Implementing these changes will help developers seamlessly integrate external-attacher into their projects using standard Go tooling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions