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

Fix release script: add go mod tidy after go.mod changes #12981

Merged
merged 1 commit into from
May 17, 2021

Conversation

ptabor
Copy link
Contributor

@ptabor ptabor commented May 16, 2021

Seems that additinal refresh of go.sum files is needed during the
release process after editing the versions of modules.

Discovered the problem while I was testing whether etcdutl is
properly included in the target binaries using:

DRY_RUN=true REPOSITORY=\`pwd\` BRANCH='branch-with-etcdutl' ./scripts/release 3.5.0-foobar.2

Seems that additinal refresh of go.sum files is needed during the
release process after editing the versions of modules.

Discovered the problem while I was testing whether etcdutl is
properly included in the target binaries using:

```
DRY_RUN=true REPOSITORY=\`pwd\` BRANCH='branch-with-etcdutl' ./scripts/release 3.5.0-foobar.2
```
@codecov-commenter
Copy link

Codecov Report

Merging #12981 (2712c78) into main (9501e8e) will increase coverage by 6.38%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12981      +/-   ##
==========================================
+ Coverage   46.10%   52.49%   +6.38%     
==========================================
  Files         409      315      -94     
  Lines       33636    26602    -7034     
==========================================
- Hits        15509    13965    -1544     
+ Misses      16119    10905    -5214     
+ Partials     2008     1732     -276     
Flag Coverage Δ
all 52.49% <ø> (+6.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/pkg/v3/fileutil/dir_unix.go 0.00% <0.00%> (-100.00%) ⬇️
client/pkg/v3/fileutil/sync_linux.go 0.00% <0.00%> (-100.00%) ⬇️
client/pkg/v3/fileutil/read_dir.go 0.00% <0.00%> (-90.00%) ⬇️
client/pkg/v3/transport/timeout_transport.go 0.00% <0.00%> (-86.37%) ⬇️
client/pkg/v3/types/id.go 0.00% <0.00%> (-75.00%) ⬇️
pkg/grpc_testing/stub_server.go 0.00% <0.00%> (-64.00%) ⬇️
pkg/ioutil/util.go 0.00% <0.00%> (-63.64%) ⬇️
pkg/runtime/fds_linux.go 0.00% <0.00%> (-53.85%) ⬇️
client/pkg/v3/types/urlsmap.go 0.00% <0.00%> (-50.91%) ⬇️
client/pkg/v3/fileutil/lock_linux.go 19.44% <0.00%> (-36.12%) ⬇️
... and 128 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9501e8e...2712c78. Read the comment docs.

Copy link
Contributor

@lilic lilic left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@serathius serathius left a comment

Choose a reason for hiding this comment

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

LGTM,
In other projects I work we have static analysis that ensures that running go mod verify and go mod tidy passes without code diff on merged PRs. Would be happy to implement this.

@ptabor
Copy link
Contributor Author

ptabor commented May 17, 2021

We perform the go mod tidy verification:

etcd/test.sh

Line 666 in f82b5cb

log_error "${PWD}/go.mod is not in sync with 'go mod tidy'"

as part of PASSES="fmt" ./test.sh. Didn't know about go mod verify. We might consider adding if its not verified by go build.

@ptabor ptabor merged commit 1675101 into etcd-io:main May 17, 2021
@ptabor ptabor deleted the 20210516-fix-release-script branch May 17, 2021 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants