go.mod: fix module path for v2 tags#2720
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
iurii-ssv
left a comment
There was a problem hiding this comment.
Looks good if it works.
% tmpdir="$(mktemp -d)"
cd "$tmpdir"
go mod init verifyrelease
GOPROXY=direct GOSUMDB=off go get github.com/ssvlabs/ssv/protocol/v2/types@v2.4.2
go: creating new go.mod: module verifyrelease
go: github.com/ssvlabs/ssv/protocol/v2/types@v2.4.2: github.com/ssvlabs/ssv@v2.4.2: invalid version: module contains a go.mod file, so module path must match major version ("github.com/ssvlabs/ssv/v2")
% % tmpdir="$(mktemp -d)"
cd "$tmpdir"
go mod init verifyfix
GOPROXY=direct GOSUMDB=off go get github.com/ssvlabs/ssv/v2/protocol/v2/types@fix-go-v2-module
go build github.com/ssvlabs/ssv/v2/protocol/v2/types
go: creating new go.mod: module verifyfix
go: added github.com/attestantio/go-eth2-client v0.27.0
(...)
go: added gopkg.in/yaml.v2 v2.4.0
% The proper testing would require creating a version, though |
# Conflicts: # network/p2p/p2p_discovery.go # operator/duties/attester.go # operator/duties/scheduler.go # operator/duties/sync_committee.go # protocol/v2/queue/worker/message_worker.go
oleg-ssvlabs
left a comment
There was a problem hiding this comment.
I was quite boring person and went through all 400 files.
Left couple of comments. There is no need to add V2 to github URLs. I believe it will result in 404
Thanks for the thorough review. Well spotted! |
momosh-ssv
left a comment
There was a problem hiding this comment.
Seems like a well played mechanical import path rename — no logic changes.
# Conflicts: # go.mod # go.sum
b73085a
…-module # Conflicts: # api/handlers/node/node.go # api/handlers/node/node_test.go # cli/operator/node.go # cli/operator/prober.go # go.mod # network/p2p/p2p_discovery.go # network/p2p/p2p_discovery_test.go # nodeprobe/nodeprobe.go # nodeprobe/nodeprobe_test.go # ssvsigner/client.go # ssvsigner/cmd/purge-keys/purge-keys.go # ssvsigner/e2e/common/beacon_config.go # ssvsigner/e2e/testenv/environment.go # ssvsigner/e2e/testenv/key_managers.go # ssvsigner/ekm/key_manager.go # ssvsigner/ekm/local_key_manager.go # ssvsigner/ekm/local_key_manager_test.go # ssvsigner/ekm/mock.go # ssvsigner/ekm/remote_key_manager.go # ssvsigner/ekm/remote_key_manager_test.go # ssvsigner/ekm/signer_storage.go # ssvsigner/ekm/signer_storage_test.go # ssvsigner/ekm/slashing_protector.go # ssvsigner/ekm/slashing_protector_test.go # ssvsigner/go.mod # ssvsigner/observability.go # ssvsigner/server.go
…-module # Conflicts: # protocol/v2/qbft/config.go # protocol/v2/qbft/spectest/msg_processing_type.go # protocol/v2/qbft/spectest/qbft_mapping_test.go # protocol/v2/ssv/runner/committee_test.go # protocol/v2/ssv/runner/proposer_test.go # protocol/v2/ssv/runner/timer.go # protocol/v2/ssv/spectest/msg_processing_type.go # protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go # protocol/v2/testing/utils.go
ljuba-ssv
left a comment
There was a problem hiding this comment.
After merge, the two go test invocations in .github/workflows/dutytracer-bench.yml will fail — the file isn't in this PR's diff so I couldn't anchor inline, but the lines are:
- L29:
go test -benchmem -run=^$ -bench ^BenchmarkTracer$ github.com/ssvlabs/ssv/operator/dutytracer -v - L34:
go test -tags lfs -timeout 5s -run ^TestEviction$ github.com/ssvlabs/ssv/operator/dutytracer -v
Both use the old github.com/ssvlabs/ssv/operator/dutytracer path. Once the module is renamed to github.com/ssvlabs/ssv/v2 this no longer resolves. Verified on this branch:
$ go test -list '.*' github.com/ssvlabs/ssv/operator/dutytracer
# github.com/ssvlabs/ssv/operator/dutytracer
no required module provides package github.com/ssvlabs/ssv/operator/dutytracer
FAIL github.com/ssvlabs/ssv/operator/dutytracer [setup failed]
exit=1
github.com/ssvlabs/ssv/v2/operator/dutytracer resolves cleanly. The workflow will break on the next workflow_dispatch or push to feat/exporter-v2. Two-line fix: add /v2/ to both test paths.
# Conflicts: # go.mod # message/validation/consensus_validation.go # message/validation/consensus_validation_test.go # protocol/v2/qbft/controller/controller_test.go # protocol/v2/qbft/controller/decided.go # protocol/v2/qbft/instance/test_helpers_test.go # protocol/v2/qbft/spectest/controller_type.go # protocol/v2/qbft/spectest/msg_processing_type.go # protocol/v2/qbft/spectest/qbft_mapping_test.go # protocol/v2/ssv/runner/committee_test.go # protocol/v2/ssv/runner/timer.go # protocol/v2/ssv/spectest/msg_processing_type.go # protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go # protocol/v2/ssv/spectest/ssv_mapping_test.go # protocol/v2/ssv/validator/committee_queue_test.go # protocol/v2/ssv/validator/timer.go
These two files were added on stage with `github.com/ssvlabs/ssv/...` imports and slipped through the v2 path rewrite during the merge from stage. Update them to use the `github.com/ssvlabs/ssv/v2/...` paths the module declares.
Bumps go.opentelemetry.io/otel, otel/metric, and otel/trace from v1.38.0 to v1.41.0 to match the versions stage already pulls in transitively. Run via `go mod tidy`.
|
Deferring to v2.4.4 so we can verify properly. Per @nkryuchkov's test note: the branch-based Plan for v2.4.4:
Tracking issue moved to milestone v2.4.4: ssvlabs/ssv-node-board#1060. |
This fixes the Go module path so
v2.xtags can actually be consumed as a library.Currently, since our major release versions are
v2.x, externalgo getfails for tags due to the module not being declared with the/v2suffixCloses ssvlabs/ssv-node-board#1060