IBM-Blockchain / ansible-collection

Ansible collection for building Hyperledger Fabric networks
Apache License 2.0
43 stars 38 forks source link

Deploy Contract with ansible Playbook does not take care of sequence #632

Closed riki95 closed 1 year ago

riki95 commented 1 year ago

If I deploy a Chaincode from the IBM VS Code extension, that is taking care of the sequence, meaning that is query the committed chaincode, checking at the sequence number, increase it by 1 and upgrading the contract.

Ansible playbooks are not doing so, but it a small effort to introduce such a thing. Plugins are using this function yet committed_chaincodes = peer_connection.query_committed_chaincodes(channel) so the information is already present. After this command, we know the committed chaincodes and their sequence.

This means that the sequence number can be automated while approving the chaincode for the organization and also for the commit phase. I am asking to introduce this automated feature because, while using ansible playbooks to deploy SCs, it is very boring to manually upgrade the sequence each time.