-
Notifications
You must be signed in to change notification settings - Fork 140
fix: Refactoring the download process for StaticSiteClient
#936
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
Conversation
|
@Timothyw0 @cjk7989 I consider this to be a fairly critical issue, so it would be very helpful if you could review it 🙏 Thanks! |
mohamedfarees
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on test result, LGTM, It will be great if this fix goes to live
|
@Timothyw0 and @cjk7989 are you able to review this pull request? We are an Azure Enterprise customer and this is creating issues for us. Happy to include our account manager if that would expedite it |
|
Hi @shibayan, I appreciate your great fix of this issue. Can you share more details on why using
instead of can improve the stability of downloading? As I understand, Thank you! |
|
The PR has passed testing in the Linux environment. |
|
@cjk7989 As you understand it, the main difference is that stp.piepline, instead of using a callback, will certainly do the closing and other processing when the stream copy is complete. Node's WritableStream is introduced as being closed automatically, but in fact it seems that it must be closed explicitly and committed reliably. In the case of callbacks, there is a difference between Perhaps this could have been solved by simply adding an explicit stream close process, but we decided that this method was more reliable and simpler to code. |
|
Hi @cjk7989 |
Fixed an issue where
ETXTBSYandEBUSYerrors would occur when executing processes usingspawnafter the download process ran whenStaticSiteClientdid not exist.In this PR, we simplified the close processing and error handling after downloading the file by using the Streams Promises API, and stabilized the download process.
I wrote the following workflow and checked the failure rate of the
swa deploycommand in the branches before and after the improvement.deploy-new.ymlis the workflow that uses the fixes in this PR. I can see that the deployment stability has improved significantly, as the failure rate of the workflow after the fixes is 0%, whereas the failure rate of the workflow before the fixes was over 60%.Fixes #721
Fixes #799
Fixes #916