-
Notifications
You must be signed in to change notification settings - Fork 66
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
Testing: update Prometheus tests to go 1.21.4 #1511
Conversation
…d put the tarball into a different bucket
installCmd = fmt.Sprintf(` | ||
cd (New-TemporaryFile | %% { Remove-Item $_; New-Item -ItemType Directory -Path $_ }) | ||
Invoke-WebRequest "https://go.dev/dl/go%s.windows-%s.msi" -OutFile golang.msi | ||
Start-Process msiexec.exe -ArgumentList "/i","golang.msi","/quiet" -Wait `, goVersion, goArch) | ||
} else { | ||
installCmd = fmt.Sprintf(` | ||
set -e | ||
set -o pipefail |
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.
I switched this to use RunRemotely because I personally prefer RunRemotely unless you need the extra features of RunScriptRemotely like command line arguments. RunRemotely is also simpler and produces better messages in the logs.
set -e is unnecessary because the command (excluding "set -o pipefail") is only 1 line long. (this applies equally to RunScriptRemotely and RunRemotely). We don't include set -e for other RunRemotely commands so I removed it here.
set -o pipefail is there so that a nonzero exit code from gsutil cp
produces an error instead of being ignored. It's a best practice when piping commands together and you need them all to succeed.
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.
LGTM!
Description
Also provide better instructions for updating it using
mirror_content.sh
, which puts the tarball into a different bucket.Also includes a few other mini fixes to installGolang, such as
RunScriptRemotely
->RunRemotely
and some comment tweaks.This is a follow up to #1509.
Related issue
b/310621875
How has this been tested?
Checklist: