Reload improvements: Add retry to shell copy and --no-build to a part #5473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two improvements to the reload process:
Adds an automatic retry to the shell copy. I've seen various scenarios where shell service can fail and I think we should be defensive in the reload process for it. Due to networking situations or user error, subsequent copies to the part can pass once the part is online.
Allows for copying an existing build artifact that you have locally to the same part again or another part using
--no-build. Before this change--no-buildwas used only forreload-localto do the same thing. I reorganized the folders to omit the part-id from the file path and we now persist the latest binary for each platform in the same folder. I feel like its more organized this way.Testing:
Retry is displayed to the user and correctly connects and copies the file after a few failures. To simulate this I restarted the part while the copy was happening.
Output when all attempts to copy fails (changed to two retries temporarily to speed up manual testing).
Output with --no-build option: