-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
pkg/asset/targets: Render the metadata asset before cluster #1199
pkg/asset/targets: Render the metadata asset before cluster #1199
Conversation
Otherwise Terraform failures will lead to exits without metadata.json, which makes it harder for users to reap any resources from the possibly-partially-created cluster. Before this commit: $ git diff -U1 | cat diff --git a/pkg/terraform/terraform.go b/pkg/terraform/terraform.go index f566d34..bad05e5 100644 --- a/pkg/terraform/terraform.go +++ b/pkg/terraform/terraform.go @@ -53,2 +53,3 @@ func Apply(dir string, platform string, extraArgs ...string) (path string, err e + return sf, errors.New("faking a Terraform failure") if exitCode := texec.Apply(dir, args, lpDebug, lpError); exitCode != 0 { $ hack/build.sh $ openshift-install --dir=wking create cluster INFO Consuming "Install Config" from target directory INFO Creating cluster... ERROR Failed to read tfstate: open /tmp/openshift-install-655768368/terraform.tfstate: no such file or directory FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: faking a Terraform failure $ ls wking auth terraform.tfvars tls With this commit, we get metadata.json too. Fixes a bug introduced by the re-order in 75ab106 (assets: add tests for validating asset fetching of targets, 2018-12-12, openshift#890, v0.12.0).
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crawford, wking 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 |
@wking: 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. |
This is currently killing us in CI. This is an extremely simple change and has already been tested (this was the order we previously used). I am going to force this through CI. Have mercy on my soul. /override ci/prow/e2e-aws |
I force merged |
Otherwise Terraform failures will lead to exits without
metadata.json
, which makes it harder for users to reap any resources from the possibly-partially-created cluster. Before this commit:With this commit, we get
metadata.json
too. Fixes a bug introduced by the re-order in 75ab106 (#890, v0.12.0).