We encountered an issue where error messages were hidden/not visible in recent provider releases. When we try to create a resource with incorrect or incomplete configuration, it gets stuck at creating false. See the discussion here.
Since recoverIfPanic is executed first, we pass ph.err as nil to the finishing operations, which causes the error to be hidden.
This PR removes ph.err = nil from the recoverIfPanic func.
After go mod edit -replace=github.com/crossplane/upjet=github.com/turkenf/upjet@fix-nil-err
conditions:
- lastTransitionTime: "2024-09-09T17:22:07Z"
reason: Creating
status: "False"
type: Ready
- lastTransitionTime: "2024-09-09T17:23:56Z"
message: 'create failed: async create failed: failed to create the resource: [{0
Request `Create IAM Members roles/viewer serviceAccount:<redacted>
for project "xxx"` returned error: Error retrieving IAM policy for project "xxx":
googleapi: Error 403: The caller does not have permission, forbidden []}]'
reason: ReconcileError
status: "False"
type: Synced
- lastTransitionTime: "2024-09-09T17:23:56Z"
message: 'async create failed: failed to create the resource: [{0 Request `Create
IAM Members roles/viewer serviceAccount:<redacted>
for project "xxx"` returned error: Error retrieving IAM policy for project "xxx":
googleapi: Error 403: The caller does not have permission, forbidden []}]'
reason: AsyncCreateFailure
status: "False"
type: LastAsyncOperation
Description of your changes
We encountered an issue where error messages were hidden/not visible in recent provider releases. When we try to create a resource with incorrect or incomplete configuration, it gets stuck at creating false. See the discussion here.
Since
recoverIfPanic
is executed first, we passph.err
as nil to the finishing operations, which causes the error to be hidden.This PR removes
ph.err = nil
from therecoverIfPanic
func.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
After running make run in the main branch of
crossplane-contrib/provider-upjet-gcp
apply the following resource below:go mod edit -replace=github.com/crossplane/upjet=github.com/turkenf/upjet@fix-nil-err