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

fix: fix component install when fail to be installed at the first time #520

Merged
merged 7 commits into from
Dec 11, 2023

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented Nov 21, 2023

fuelup toolchain install latest won't work properly if fail to be installed at the first time.

When we run fuelup toolchain install latest again, it will show all components are installed. Actually, the components which were failed to be installed at first time are still missing.

The reason is downloader will create file before downloading process start and won't delete file after downloading process is fail. Also, add_component checks the component file ~/.fuelup/store/{component-version}-xxx.tar.gz is exist, and then won't install the component anymore.


logs about fuelup toolchain install latest been executed at first time:

The Fuel toolchain is partially installed.
fuelup failed to install: - Could not add component forc-wallet(0.3.0): Failed to download forc-wallet-0.3.0-x86_64-unknown-linux-gnu.tar.gz - Unexpected error: https://github.com/FuelLabs/forc-wallet/releases/download/v0.3.0/forc-wallet-0.3.0-x86_64-unknown-linux-gnu.tar.gz: Network Error: Network Error: Error encountered in the status line: unexpected end of file. The release may not be ready yet.
- Could not add component fuel-core(0.20.5): Failed to download fuel-core-0.20.5-x86_64-unknown-linux-gnu.tar.gz - Unexpected error: https://github.com/FuelLabs/fuel-core/releases/download/v0.20.5/fuel-core-0.20.5-x86_64-unknown-linux-gnu.tar.gz: Connection Failed: Connect error: connection timed out. The release may not be ready yet.
- Could not add component fuel-core-keygen(0.20.5): Failed to download fuel-core-keygen-0.20.5-x86_64-unknown-linux-gnu.tar.gz - response body closed before all bytes were read. The release may not be ready yet.

logs about fuelup toolchain install latest been executed again.

Downloading: forc forc-explore forc-index forc-wallet fuel-core fuel-core-keygen fuel-indexer 

Adding component forc v0.46.1 to 'latest-x86_64-unknown-linux-gnu'
Installed forc v0.46.1 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component forc-explore v0.28.1 to 'latest-x86_64-unknown-linux-gnu'
Installed forc-explore v0.28.1 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component forc-index v0.23.0 to 'latest-x86_64-unknown-linux-gnu'
Installed forc-index v0.23.0 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component forc-wallet v0.3.0 to 'latest-x86_64-unknown-linux-gnu'
Installed forc-wallet v0.3.0 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component fuel-core v0.20.5 to 'latest-x86_64-unknown-linux-gnu'
Installed fuel-core v0.20.5 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component fuel-core-keygen v0.20.5 to 'latest-x86_64-unknown-linux-gnu'
Installed fuel-core-keygen v0.20.5 for toolchain 'latest-x86_64-unknown-linux-gnu'

Adding component fuel-indexer v0.23.0 to 'latest-x86_64-unknown-linux-gnu'
Installed fuel-indexer v0.23.0 for toolchain 'latest-x86_64-unknown-linux-gnu'

Installed:
- forc 0.46.1
- forc-explore 0.28.1
- forc-index 0.23.0
- forc-wallet 0.3.0
- fuel-core 0.20.5
- fuel-core-keygen 0.20.5
- fuel-indexer 0.23.0

@Halimao Halimao changed the title fix: fix component install when fail to install at the first time fix: fix component install when fail to be installed at the first time Nov 21, 2023
sdankel
sdankel previously approved these changes Dec 4, 2023
Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

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

Tested it locally and it seems to be working well. Thanks!

@Halimao
Copy link
Contributor Author

Halimao commented Dec 4, 2023

@sdankel Hi, update the code style to let ci cargo-fmt-check happy~

@Halimao
Copy link
Contributor Author

Halimao commented Dec 9, 2023

@sdankel Hi sir, can we get this merged, as this is a bug fix😀

@sdankel sdankel enabled auto-merge (squash) December 11, 2023 21:24
@sdankel sdankel merged commit 423e5bb into FuelLabs:master Dec 11, 2023
15 checks passed
@Halimao Halimao deleted the fix/toolchain-install branch December 12, 2023 00:32
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