Skip to content

Commit 59fdb02

Browse files
EtiennePerotgvisor-bot
authored andcommitted
PGO profile update: Fix non-interactive PR creation.
The 'yes' command will fail when the `gh` command closes its stdin, which the Bash `pipefail` option treats as a total failure. So disable this option for this particular command. PiperOrigin-RevId: 772511857
1 parent 0277f27 commit 59fdb02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.buildkite/scripts/pgo/commit-update.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,16 @@ export GIT_COMMITTER_NAME=gvisor-bot
3838
export GIT_COMMITTER_EMAIL=gvisor-bot@google.com
3939
git commit -m "Update runsc profiles for PGO (profile-guided optimizations), $today."
4040
git push --set-upstream https://github.com/google/gvisor.git "$pgo_branch_name"
41+
42+
# The 'yes' command will fail when the `gh` command closes its stdin,
43+
# which the `pipefail` option treats as a total failure.
44+
# So disable this option for this particular command.
45+
set +o pipefail
4146
yes '' | gh pr create \
4247
--title="Update runsc profiles for PGO (profile-guided optimizations), $today." \
4348
--body='This PR updates the runsc profiles for PGO (profile-guided optimizations).' \
4449
--label=pgo-update --label='ready to pull' \
4550
--base=master --head="$pgo_branch_name"
51+
set -o pipefail
52+
4653
echo 'PGO profile update PR created.' >&2

0 commit comments

Comments
 (0)