Skip to content

tools: move lister and verifier to tools/ - #202

Merged
k8s-ci-robot merged 1 commit into
kubernetes-csi:mainfrom
iPraveenParihar:fix/tool-install
Feb 4, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes-csi:mainfrom
iPraveenParihar:fix/tool-install

Conversation

@iPraveenParihar

Copy link
Copy Markdown
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Problem: Users cannot install the snapshot-metadata-lister and snapshot-metadata-verifier tools using go install due to the main module's replace directives:

go install github.com/kubernetes-csi/external-snapshot-metadata/examples/snapshot-metadata-verifier@v0.2.0

Results in:

go: The go.mod file for the module providing named packages contains one or
    more replace directives. It must not contain directives that would cause
    it to be interpreted differently than if it were the main module.

Solution: Extract the tools into separate Go modules under tools/ directory. Each tool now has its own go.mod without any replace directives.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

The snapshot-metadata-lister and snapshot-metadata-verifier tools can now be installed directly using `go install`:
- `go install github.com/kubernetes-csi/external-snapshot-metadata/tools/snapshot-metadata-lister@latest`
- `go install github.com/kubernetes-csi/external-snapshot-metadata/tools/snapshot-metadata-verifier@latest`

Previously, installation failed due to `replace` directives in the main module's go.mod.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Jan 29, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 29, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @iPraveenParihar. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 29, 2026
@Rakshith-R
Rakshith-R marked this pull request as ready for review January 29, 2026 12:38
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2026
@Rakshith-R

Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 29, 2026
@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

Integration tests failing because of certs expired, fixed by #203


go build -o snapshot-metadata-lister ./examples/snapshot-metadata-lister/main.go
go build -o snapshot-metadata-verifier ./examples/snapshot-metadata-verifier/main.go
go build -o snapshot-metadata-lister ./tools/snapshot-metadata-lister/main.go

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.

Can we keep the tools in examples repo?

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.

symlinks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can we keep the tools in examples repo?

we will end up with ambiguous import because Go finds the same package path in module cache: When examples/snapshot-metadata-verifier/go.mod requires github.com/kubernetes-csi/external-snapshot-metadata v0.2.0.

Since the published v0.2.0 module doesn't have a tools/ directory, there's no conflict, Go can only find it from the local go.mod.

Signed-off-by: Praveen M <m.praveen@ibm.com>

@Rakshith-R Rakshith-R 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.

This change is required to complete k8s e2e suite
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iPraveenParihar, Rakshith-R

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 4, 2026
@k8s-ci-robot
k8s-ci-robot merged commit e89ff8d into kubernetes-csi:main Feb 4, 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

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants