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

Remove chaincode legacy cli command #4586

Merged
merged 3 commits into from
Jan 12, 2024

Conversation

C0rWin
Copy link
Contributor

@C0rWin C0rWin commented Dec 28, 2023

This commit is to remove the peer cli chaincode command to get rid of the deprecated chaincode lifecycle.

@C0rWin C0rWin requested a review from a team as a code owner December 28, 2023 00:06
@C0rWin C0rWin requested a review from a team as a code owner December 28, 2023 08:32
Copy link
Contributor

@satota2 satota2 left a comment

Choose a reason for hiding this comment

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

Hello @C0rWin
My understanding is that the peer chaincode invoke and query commands are not deprecated and are currently still in use. So, I think they should not be removed yet. Could you please confirm this?

@C0rWin
Copy link
Contributor Author

C0rWin commented Dec 28, 2023

Hello @C0rWin My understanding is that the peer chaincode invoke and query commands are not deprecated and are currently still in use. So, I think they should not be removed yet. Could you please confirm this?

Yes, you are correct, will bring it back, thanks.

@C0rWin C0rWin marked this pull request as draft December 28, 2023 09:21
@C0rWin C0rWin force-pushed the rmv-peer-chaincode-command branch 2 times, most recently from 4324138 to 62660a8 Compare January 2, 2024 13:25
@C0rWin C0rWin marked this pull request as ready for review January 2, 2024 13:25
@C0rWin C0rWin force-pushed the rmv-peer-chaincode-command branch 3 times, most recently from 0485f9d to 82dce62 Compare January 2, 2024 13:46
@C0rWin C0rWin closed this Jan 2, 2024
@C0rWin C0rWin reopened this Jan 2, 2024
@C0rWin C0rWin force-pushed the rmv-peer-chaincode-command branch 3 times, most recently from d63b282 to 64fefb4 Compare January 2, 2024 20:43
Copy link
Member

@yeasy yeasy left a comment

Choose a reason for hiding this comment

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

Fine with the change.
And should we move this part to somewhere as an individual package? in case someone want to check/read the code?

@C0rWin
Copy link
Contributor Author

C0rWin commented Jan 3, 2024

Fine with the change. And should we move this part to somewhere as an individual package? in case someone want to check/read the code?

wdym? it's already in separate package.

@C0rWin C0rWin requested a review from denyeart January 4, 2024 07:47
@@ -115,18 +97,8 @@ func resetFlags() {
"The channel on which this command should be executed")
flags.StringVarP(&policy, "policy", "P", common.UndefinedParamValue,
"The endorsement policy associated to this chaincode")
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe these flags can also be removed since they are not used for invoke or query:

  • lang
  • path
  • version
  • username
  • policy

Also remove the corresponding variables above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not think you can remove version, since it's part of the chaincode specification. I will remove the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@denyeart lang, version and path are used in ChaincodeSpec, hence we cannot take them away, while I removed policy and username.

See:

image

Signed-off-by: Artem Barger <artem@bargr.net>
Signed-off-by: Artem Barger <artem@bargr.net>
Signed-off-by: Artem Barger <artem@bargr.net>
@denyeart denyeart merged commit 713ece2 into hyperledger:main Jan 12, 2024
14 checks passed
@satota2
Copy link
Contributor

satota2 commented Feb 13, 2024

Hello @C0rWin @denyeart
Regarding this PR, I've noticed that the documentation still includes examples of the sub-commands that were removed. My apologies if this is already known or scheduled to be addressed.
If necessary, I can create a patch to update the documentation. Would it be helpful if I did so?

@denyeart
Copy link
Contributor

Hello @C0rWin @denyeart Regarding this PR, I've noticed that the documentation still includes examples of the sub-commands that were removed. My apologies if this is already known or scheduled to be addressed. If necessary, I can create a patch to update the documentation. Would it be helpful if I did so?

My plan was to wait for @C0rWin to complete his series of removal PRs and then do a full assessment of any remaining references to be removed. I'll defer to @C0rWin whether he wants help with the docs or other areas.

@C0rWin
Copy link
Contributor Author

C0rWin commented Feb 13, 2024

Hello @C0rWin @denyeart Regarding this PR, I've noticed that the documentation still includes examples of the sub-commands that were removed. My apologies if this is already known or scheduled to be addressed. If necessary, I can create a patch to update the documentation. Would it be helpful if I did so?

My plan was to wait for @C0rWin to complete his series of removal PRs and then do a full assessment of any remaining references to be removed. I'll defer to @C0rWin whether he wants help with the docs or other areas.

I have the final mile to remove the actual code that implements these commands. Unfortunately, pieces of this code are convoluted with the new lifecycle and it's trickier given that we need to make sure not to break the validation part in case new peers will get connected with some legacy systems.

@satota2
Copy link
Contributor

satota2 commented Feb 15, 2024

@C0rWin @denyeart Thanks for your response. I understand the plan and the current situation now.
Please let me know if there is anything I can help with, including updating the documentation, at any time.

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.

4 participants