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

Update build file to run with an argument #14097

Merged
merged 2 commits into from
Jun 13, 2022
Merged

Conversation

patrocinio
Copy link
Contributor

The current Makefile doesn't allow the compilation of the tools directory.
This commit updates the Makefile and the build file to add an option
to build the tools.

To build the tools, you can run make build_tools.

The current Makefile doesn't allow the compilation of the tools directory.
This commit updates the Makefile and the build file to add an option
to build the tools.

To build the tools, you can run make build_tools.
@codecov-commenter
Copy link

Codecov Report

Merging #14097 (73766a9) into main (50d93eb) will decrease coverage by 0.22%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #14097      +/-   ##
==========================================
- Coverage   75.18%   74.95%   -0.23%     
==========================================
  Files         452      452              
  Lines       36769    36769              
==========================================
- Hits        27645    27562      -83     
- Misses       7388     7459      +71     
- Partials     1736     1748      +12     
Flag Coverage Δ
all 74.95% <ø> (-0.23%) ⬇️

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

Impacted Files Coverage Δ
server/etcdserver/api/rafthttp/peer_status.go 87.87% <0.00%> (-12.13%) ⬇️
server/etcdserver/api/rafthttp/peer.go 87.01% <0.00%> (-8.45%) ⬇️
client/pkg/v3/tlsutil/tlsutil.go 83.33% <0.00%> (-8.34%) ⬇️
client/pkg/v3/fileutil/purge.go 66.03% <0.00%> (-7.55%) ⬇️
client/v3/namespace/watch.go 87.87% <0.00%> (-6.07%) ⬇️
server/storage/mvcc/watchable_store.go 85.14% <0.00%> (-4.72%) ⬇️
client/v3/concurrency/session.go 88.63% <0.00%> (-4.55%) ⬇️
server/etcdserver/api/v3rpc/member.go 93.54% <0.00%> (-3.23%) ⬇️
server/proxy/grpcproxy/watch.go 93.64% <0.00%> (-2.90%) ⬇️
server/etcdserver/api/v3rpc/watch.go 85.90% <0.00%> (-2.69%) ⬇️
... and 12 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 50d93eb...73766a9. Read the comment docs.

Copy link
Contributor

@ptabor ptabor left a comment

Choose a reason for hiding this comment

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

Thank you. Overall the directions looks good to me.

Ideally we should separate build.sh into build_lib.sh that is used by test.sh and separate build_tools.sh & build_etcd.sh top-level script.

Makefile Outdated
@@ -27,6 +27,9 @@ build:
./bin/etcdctl version
./bin/etcdutl version

build_tools:
GO_BUILD_FLAGS="-v" ./scripts/build.sh tools_build
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you, please change it to use build_tools across the board (including test.sh) script. Otherwise it will be confusing to remember whether it's tools_build or build_tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @ptabor Thank you for your feedback. I will change to build_tools to make it consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Notice that the tools_build function in the build.sh was already there. It simply didn't have a way to be called.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After reviewing the function names in the build library functions, I saw they are called etcd_build, tools_build, test_build, so for consistency I recommend we keep the tools_build name. I hope that's OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding creating a build_etcd.sh script, the current build.sh is referred to many places, so I suggest we keep it for consistency. Now a build_etcd.sh file would be almost a duplicate of build.sh. Do you still want to have it created?

Copy link
Contributor

Choose a reason for hiding this comment

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

You are right. Let's keep build.sh. Thank you for the change.

The current Makefile doesn't allow the compilation of the tools directory.
This commit creates a build library file, updates the Makefile
and a top level script fod building tools.

To build the tools, you can run make build_tools.

As before, you can run make build to build etcd binaries.
@ptabor
Copy link
Contributor

ptabor commented Jun 13, 2022

LGTM.
@ahrtr @serathius for a second look.

@serathius serathius merged commit 4ce7a85 into etcd-io:main Jun 13, 2022
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