Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarmd: remove /v2/ from module path #3173

Merged
merged 1 commit into from Apr 15, 2024

Conversation

corhere
Copy link
Contributor

@corhere corhere commented Mar 20, 2024

The module path for swarmd is not valid for the location of the swarmd module within the swarmkit repo. The go command resolves package paths to the swarmkit/v2 module and fails when the packages don't exist.

$ go run github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool@master
go: github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool@master: module github.com/moby/swarmkit/v2@master found (v2.0.0-20240227173239-911c97650f2e), but does not contain package github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool

(This is only a problem when swarmd is not the main module.)

Fix the swarmd module's path to align with the module source location so that go run can once again be used to invoke swarm-rafttool and the other commands.

- What I did

- How I did it

- How to test it

- Description for the changelog

The module path for swarmd is not valid for the location of the swarmd
module within the swarmkit repo. The go command resolves package paths
to the swarmkit/v2 module and fails when the packages don't exist.

    $ go run github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool@master
    go: github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool@master: module github.com/moby/swarmkit/v2@master found (v2.0.0-20240227173239-911c97650f2e), but does not contain package github.com/moby/swarmkit/v2/swarmd/cmd/swarm-rafttool

(This is only a problem when swarmd is not the main module.)

Fix the swarmd module's path to align with the module source location so
that `go run` can once again be used to invoke swarm-rafttool and the
other commands.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@codecov-commenter
Copy link

Codecov Report

Merging #3173 (906172e) into master (911c976) will increase coverage by 0.23%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3173      +/-   ##
==========================================
+ Coverage   57.28%   57.52%   +0.23%     
==========================================
  Files         144      144              
  Lines       30598    30598              
==========================================
+ Hits        17528    17600      +72     
+ Misses      11732    11671      -61     
+ Partials     1338     1327      -11     

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit c1c857e into moby:master Apr 15, 2024
9 checks passed
@corhere corhere deleted the fix-swarmd-module-path branch April 15, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants