splitting the peer into a client and a server - part 1 - #5442
Open
pfi79 wants to merge 1 commit into
Open
Conversation
pfi79
force-pushed
the
peer-cli-1
branch
2 times, most recently
from
June 8, 2026 13:52
a2a17a1 to
f9b134c
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new peercli client binary as the first step toward separating peer client and server responsibilities, while marking many existing peer CLI subcommands as deprecated and updating docs/tests accordingly.
Changes:
- Add a new
peercliexecutable and wire it into build/release tooling. - Thread an
isNewflag through many existing CLI command factories to toggle deprecation messaging and behavior. - Update integration tests and generated command reference docs to use
peercliand document deprecations.
Reviewed changes
Copilot reviewed 116 out of 116 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/help_docs.sh | Generate/check peercli command docs |
| RELEASING.md | Replace peer with peercli examples |
| Makefile | Add peercli to tool executables |
| internal/peer/snapshot/submitrequest.go | Add isNew + deprecation strings |
| internal/peer/snapshot/submitrequest_test.go | Update tests for new signature |
| internal/peer/snapshot/snapshot.go | Add isNew + deprecation strings |
| internal/peer/snapshot/listpending.go | Add isNew + deprecation strings |
| internal/peer/snapshot/listpending_test.go | Update tests for new signature |
| internal/peer/snapshot/client_test.go | Update tests for new signatures |
| internal/peer/snapshot/cancelrequest.go | Add isNew + deprecation strings |
| internal/peer/snapshot/cancelrequest_test.go | Update tests for new signature |
| internal/peer/lifecycle/lifecycle.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/queryinstalled.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/queryinstalled_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/querycommitted.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/querycommitted_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/queryapproved.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/queryapproved_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/package.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/package_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/install.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/install_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/getinstalledpackage.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/getinstalledpackage_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/commit.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/commit_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/checkcommitreadiness.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/checkcommitreadiness_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/chaincode.go | Thread isNew through subcommands |
| internal/peer/lifecycle/chaincode/calculatepackageid.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/calculatepackageid_test.go | Update tests for new signature |
| internal/peer/lifecycle/chaincode/approveformyorg.go | Add isNew + deprecation strings |
| internal/peer/lifecycle/chaincode/approveformyorg_test.go | Update tests for new signature |
| internal/peer/common/common.go | InitCmd adjustments for peercli paths |
| internal/peer/common/common_test.go | Test updated for peercli root |
| internal/peer/channel/update.go | Deprecate peer channel update |
| internal/peer/channel/signconfigtx.go | Add isNew + deprecation strings |
| internal/peer/channel/signconfigtx_test.go | Update tests for new signature |
| internal/peer/channel/list.go | Add isNew + deprecation strings |
| internal/peer/channel/list_test.go | Update tests for new signature |
| internal/peer/channel/joinbysnapshotstatus.go | Add isNew + deprecation strings |
| internal/peer/channel/joinbysnapshotstatus_test.go | Update tests for new signature |
| internal/peer/channel/joinbysnapshot.go | Add isNew + deprecation strings |
| internal/peer/channel/joinbysnapshot_test.go | Update tests for new signature |
| internal/peer/channel/join.go | Add isNew + deprecation strings |
| internal/peer/channel/join_test.go | Update tests for new signature |
| internal/peer/channel/getinfo.go | Add isNew + deprecation strings |
| internal/peer/channel/getinfo_test.go | Update tests for new signature |
| internal/peer/channel/flags_test.go | Update tests for new signature |
| internal/peer/channel/fetch.go | Add isNew behavior + deprecation strings |
| internal/peer/channel/fetch_test.go | Update tests for new signature |
| internal/peer/channel/create.go | Deprecate peer channel create |
| internal/peer/channel/channel.go | Gate deprecated subcommands for peer |
| internal/peer/chaincode/query.go | Add isNew + deprecation strings |
| internal/peer/chaincode/query_test.go | Update test expectations/signature |
| internal/peer/chaincode/invoke.go | Add isNew + deprecation strings |
| internal/peer/chaincode/invoke_test.go | Update test expectations/signature |
| internal/peer/chaincode/flags_test.go | Update tests for new signature |
| internal/peer/chaincode/chaincode.go | Thread isNew through subcommands |
| integration/smartbft/smartbft_test.go | Switch sessions to peercli helpers |
| integration/smartbft/smartbft_block_deliverer_test.go | Switch sessions to peercli helpers |
| integration/sbe/sbe_test.go | Switch sessions to peercli helpers |
| integration/raft/migration_test.go | Switch sessions to peercli helpers |
| integration/raft/config_test.go | Replace peer fetch with nwo.Fetch |
| integration/pvtdata/pvtdata_test.go | Switch sessions to peercli helpers |
| integration/pvtdata/marblechaincodeutil/testutil.go | Switch sessions to peercli helpers |
| integration/pvtdata/implicit_coll_test.go | Switch sessions to peercli helpers |
| integration/pluggable/pluggable_test.go | Switch sessions to peercli helpers |
| integration/pkcs11/pkcs11_suite_test.go | Switch sessions to peercli helpers |
| integration/nwo/network.go | Add peercli command/session helpers |
| integration/nwo/network_test.go | Switch sessions to peercli helpers |
| integration/nwo/deploy.go | Switch sessions to peercli helpers |
| integration/nwo/configblock.go | Switch sessions to peercli helpers |
| integration/nwo/components.go | Add PeerCli component build |
| integration/msp/msp_test.go | Switch sessions to peercli helpers |
| integration/lifecycle/lifecycle_test.go | Switch sessions to peercli helpers |
| integration/lifecycle/lifecycle_suite_test.go | Switch sessions to peercli helpers |
| integration/lifecycle/interop_test.go | Switch sessions to peercli helpers |
| integration/lifecycle/install_test.go | Switch sessions to peercli helpers |
| integration/ledger/snapshot_test.go | Switch sessions to peercli helpers |
| integration/ledger/reset_rollback_test.go | Switch sessions to peercli helpers |
| integration/ledger/marbles_test.go | Switch sessions to peercli helpers |
| integration/ledger/couchdb_indexes_test.go | Switch sessions to peercli helpers |
| integration/idemix/idemix_test.go | Switch sessions to peercli helpers |
| integration/gossip/gossip_test.go | Switch sessions to peercli helpers |
| integration/e2e/write_batch_test.go | Switch sessions to peercli helpers |
| integration/e2e/e2e_test.go | Switch sessions to peercli helpers |
| integration/e2e/acl_test.go | Switch sessions to peercli helpers |
| integration/discovery/discovery_test.go | Switch sessions to peercli helpers |
| integration/devmode/devmode_test.go | Switch sessions to peercli helpers |
| integration/chaincode/marbles/marbles_chaincode.go | Update CLI examples to peercli |
| docs/wrappers/peercli_version_preamble.md | Add peercli version wrapper |
| docs/wrappers/peercli_snapshot_preamble.md | Add peercli snapshot wrapper |
| docs/wrappers/peercli_snapshot_postscript.md | Add peercli snapshot examples |
| docs/wrappers/peercli_lifecycle_chaincode_preamble.md | Add peercli lifecycle wrapper |
| docs/wrappers/peercli_lifecycle_chaincode_postscript.md | Add peercli lifecycle examples |
| docs/wrappers/peercli_channel_preamble.md | Add peercli channel wrapper |
| docs/wrappers/peercli_channel_postscript.md | Add peercli channel examples |
| docs/wrappers/peercli_chaincode_preamble.md | Add peercli chaincode wrapper |
| docs/wrappers/peercli_chaincode_postscript.md | Add peercli chaincode examples |
| docs/source/commands/peersnapshot.md | Mark peer snapshot help deprecated |
| docs/source/commands/peerlifecycle.md | Mark peer lifecycle help deprecated |
| docs/source/commands/peercliversion.md | Add generated peercli version doc |
| docs/source/commands/peerclisnapshot.md | Add generated peercli snapshot doc |
| docs/source/commands/peerclicommand.md | Add top-level peercli command doc |
| docs/source/commands/peerclichannel.md | Add generated peercli channel doc |
| docs/source/commands/peerclichaincode.md | Add generated peercli chaincode doc |
| docs/source/commands/peerchannel.md | Mark peer channel help deprecated |
| docs/source/commands/peerchaincode.md | Mark peer chaincode help deprecated |
| docs/source/command_ref.rst | Include peercli commands in TOC |
| core/ledger/kvledger/kv_ledger_provider.go | Update comment to peercli wording |
| core/chaincode/platforms/golang/platform.go | Update comment to peercli wording |
| cmd/peercli/main.go | Add new peercli entrypoint |
| cmd/peercli/main_test.go | Add env config test for peercli |
| cmd/peer/main.go | Wire deprecated commands with isNew=false |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The beginning was discussed here
Add a new utility
peercli, transfer all the work inside fabric to it, mark somepeercommands as deprecated