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

[Bug]: Hash verification failing for bal tool pull #42711

Closed
gayaldassanayake opened this issue May 9, 2024 · 2 comments · Fixed by #42715
Closed

[Bug]: Hash verification failing for bal tool pull #42711

gayaldassanayake opened this issue May 9, 2024 · 2 comments · Fixed by #42715
Assignees
Labels
Area/CLI Ballerina CLI related issues. Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Milestone

Comments

@gayaldassanayake
Copy link
Contributor

gayaldassanayake commented May 9, 2024

Description

  1. When we pull a bal tool, a hash verification failure error occurs.
  2. Once pulled, the process hangs for a very long time before terminating. I suspect this is due to the issue (1).

Steps to Reproduce

With distribution version 2201.9.0 pull a bal tool.

$ bal tool pull health
ballerina/editoolspackage:1.0.0 [central.ballerina.io -> ...central.ballerinaballerina/editoolspackage:1.0.0 ballerina/editoolspackage:1.0.0 pulled from central successfully

*************************************************************
* WARNING: Certain packages may have originated from sources other than the official distributors. *
*************************************************************

* Verification failed: The hash value of the following package could not be confirmed.
ballerina/editoolspackage:1.0.0

tool 'edi:1.0.0' pulled successfully.
tool 'edi:1.0.0' is already active.

Affected Version(s)

2201.9.0

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels May 9, 2024
@gayaldassanayake gayaldassanayake added Area/CLI Ballerina CLI related issues. Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) and removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels May 9, 2024
@gayaldassanayake gayaldassanayake self-assigned this May 9, 2024
@gayaldassanayake gayaldassanayake added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label May 9, 2024
@gayaldassanayake
Copy link
Contributor Author

  1. Hash verification warning was due to not retrieving and passing the hash from the request body. This was fixed with the PR.
  2. The delay during the pull command was due to the time it took to hash the complete bala downloaded. This was fixed by adding a buffer of size 1024 (chosen since this is the value we have used for buffering in such similar cases).

@gayaldassanayake
Copy link
Contributor Author

Need to send a PR to 9.x to be sent to 9.1 patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CLI Ballerina CLI related issues. Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants