Skip to content

splitting the peer into a client and a server - part 1 - #5442

Open
pfi79 wants to merge 1 commit into
hyperledger:mainfrom
pfi79:peer-cli-1
Open

splitting the peer into a client and a server - part 1#5442
pfi79 wants to merge 1 commit into
hyperledger:mainfrom
pfi79:peer-cli-1

Conversation

@pfi79

@pfi79 pfi79 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

The beginning was discussed here

Add a new utility peercli, transfer all the work inside fabric to it, mark some peer commands as deprecated

@pfi79
pfi79 requested review from a team as code owners April 1, 2026 16:12
@pfi79
pfi79 force-pushed the peer-cli-1 branch 2 times, most recently from a2a17a1 to f9b134c Compare June 8, 2026 13:52
@tock-ibm
tock-ibm requested a lite review from Copilot August 11, 2026 19:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 peercli executable and wire it into build/release tooling.
  • Thread an isNew flag through many existing CLI command factories to toggle deprecation messaging and behavior.
  • Update integration tests and generated command reference docs to use peercli and 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.

Comment thread internal/peer/channel/create.go
Comment thread internal/peer/channel/update.go
Comment thread internal/peer/channel/fetch.go
Comment thread internal/peer/channel/fetch.go
Comment thread docs/source/commands/peerclicommand.md Outdated
Comment thread docs/source/commands/peerclicommand.md Outdated
Comment thread docs/wrappers/peercli_lifecycle_chaincode_postscript.md Outdated
Signed-off-by: Fedor Partanskiy <fredprtnsk@gmail.com>
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.

2 participants