Improve Win CI script with better exception propagation #24157
Merged
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.
https://source.cloud.google.com/results/invocations/3e1420d1-16a3-4c33-94e1-b905b02ef08e/targets/github%2Fgrpc/tests;group=tasks;test=build_artifact.python_windows_x86_Python38_32bit;row=1
TIL that Batch scripts don't have an exit-on-error option. It's pretty manual to add explicit return statement when error occurred. The older version of powershell returns 0 even if the script is terminated with an error, so there need to a mechanism to intercept the error and change the return code to 1.
Also, the PR enables Python 3.8 install script to retry when download failed.Retry might be a bit complex to put into the CI script with the while, try catch, error checking logic. The most nativeMaximumRetryCount
option can't be used because Kokoro VM's powershell is not new enough.CC @jtattermusch