Skip to content

Conversation

@H-ario-m
Copy link
Contributor

The chaincode installation form in the frontend allows users to select a specific peer node, but the backend was always using the first peer regardless of selection. This change modifies the install method in views.py to properly use the node ID provided in the request.

  • Added logic to check for node_id parameter in the request
  • Use the selected node if provided instead of defaulting to first peer
  • Added error handling for invalid node selections

Fixes #677

Signed-off-by: Anshuman ojha [email protected]

The chaincode installation form in the frontend allows users to select
a specific peer node, but the backend was always using the first peer
regardless of selection. This change modifies the install method in
views.py to properly use the node ID provided in the request.

- Added logic to check for node_id parameter in the request
- Use the selected node if provided instead of defaulting to first peer
- Added error handling for invalid node selections

Fixes hyperledger-cello#677

Signed-off-by: Anshuman ojha <[email protected]>
@yeasy yeasy requested a review from YoungHypo May 18, 2025 05:13
Copy link
Contributor

@YoungHypo YoungHypo left a comment

Choose a reason for hiding this comment

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

in related frontend component, we also need to fliter the nodes, cause ordered node is not allowed to install chaincodes.

image

YoungHypo and others added 2 commits May 20, 2025 16:50
When installing chaincodes, only peer nodes should be available for selection
since orderer nodes cannot install chaincodes. This change modifies the
InstallForm component to:

- Filter node list to only show peer nodes
- Remove orderer nodes from selection options
- Improve UX by preventing invalid node selections

This ensures users can only select valid peer nodes for chaincode installation,
preventing potential errors from attempting to install on orderer nodes.

Fixes hyperledger-cello#677

Signed-off-by: Anshuman ojha <[email protected]>
@H-ario-m H-ario-m requested a review from YoungHypo May 26, 2025 10:37
YoungHypo
YoungHypo previously approved these changes May 29, 2025
Copy link
Contributor

@YoungHypo YoungHypo left a comment

Choose a reason for hiding this comment

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

LGTM. Please resolve conflict first. @H-ario-m

@yeasy yeasy merged commit 2b7ecc9 into hyperledger-cello:main Jun 6, 2025
3 checks passed
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.

Node selection parameter in chaincode installation form not used by backend

3 participants