-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add -eou pipefail to remaining job templates #6738
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @smarterclayton @stevekuznetsov note that the last set of updates broke at least on job that had to be fixed with: i have not audited this to see if there are any undefined env vars in use in these templates... i can take the |
#!/bin/sh -x | ||
|
||
#!/bin/sh | ||
set -euo 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.
do we need to move to Bash shebangs for pipefail
? I don't know if it's POSIX
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.
we should make the header of the files consistent
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.
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.
(didn't move to /bin/bash i mean)
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.
No pipefail in POSIX. I think we should move to #!/bin/bash
.
ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml
Outdated
Show resolved
Hide resolved
ad45130
to
e1ad773
Compare
@smarterclayton updated all invocations to be
per your request. ptal. |
6c9997b
to
8238f37
Compare
Looks fine, might want to double check the rehearsals as necessary. |
I audited the rehearsal failures, none of them appear to be caused by these changes. |
@@ -1855,6 +1856,7 @@ objects: | |||
- -c | |||
- | | |||
#!/bin/bash | |||
set -euo 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.
Maybe not fail here... as teardown can have failures but should attempt to try to completion.
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.
the teardown script has the following protections that make this ok i think:
trap 'teardown' EXIT
function teardown() {
set +e
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.
@jstuever agree?
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.
hold on. teardown shouldn't need to set +e. We have a "correct" teardown on most things - if we have a non standard teardown it would only apply in that context of one job (i.e. don't go adding set +e to teardown that don't have it already)
/hold |
@bparees: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/hold cancel |
@bparees: Updated the following 35 configmaps:
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Bringing over a number of changes which have landed in ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml as of openshift/release@c64d5d7d8f (Merge pull request #6845 from wking/shared-subnets-for-other-regions, 2020-01-23). One series was AWS region sharding: * openshift/release@b7179335a3 (ci-operator/templates/openshift/installer/cluster-launch-installer-*: Random AWS regions for IPI, 2020-01-23, openshift/release#6833). * openshift/release@7e38260d25 (ci-operator/templates/openshift/installer: Shared subnets for new regions, 2020-01-23, openshift/release#6845). Another series was the password removal followed by a bunch of pipefail fumbling ;) * openshift/release@4847cb5477 (clean up install log output, 2020-01-13, openshift/release#6692). * openshift/release@5c6ca8a506 (templates: Use 'pipefail' so that grep doesn't mask install failures, 2020-01-15, openshift/release#6718). * openshift/release@bee15b9fa8 (add -eou pipefail to remaining job templates, 2020-01-16, openshift/release#6738) * openshift/release@07bd61d677 (Revert "add -eou pipefail to remaining job templates", 2020-01-17, openshift/release#6748). * openshift/release@ca655477ca (Revert "Revert "add -eou pipefail to remaining job templates"", 2020-01-17, openshift/release#6750). * openshift/release@9d7453156b (tolerate undefined env vars in teardown, 2020-01-17, openshift/release#6750). And there was also: * openshift/release@c6c2efb3fc (templates: Add ipv6 variant that triggers azure singlestack, 2020-01-22, openshift/release#6809). * openshift/release@752455a47f (templates: fix check for unset variable, 2020-01-16, openshift/release#6723).
it's understood this PR may break jobs that can't tolerate
-euo pipefail
. Expectation is for teams to fix those jobs to tolerate it, not to change the bash header. We want consistent bash headers.