feat(controller-runtime): enable recover true option #493
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
Presently, in the reconciler, an unhandled panic remains unrecovered, leading to potential crashes in the provider. This poses a significant issue since a panic could be triggered by a single managed resource in an unforeseen state. Consequently, one problematic managed resource has the potential to obstruct the processing of all other managed resources from provider.
Fixes #
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
tested with crossplane-contrib/provider-upjet-aws#780
prior to this PR, the provider experiences a crash, resulting in the following stack trace:
with this pull request, it becomes evident that the controller is now capable of recovering from panic, and as a result, the provider remains operational and functional for all other managed resources:
tested with the following configs and manifests:
add to go.mod and run
go mod tidy
replace github.com/crossplane/crossplane-runtime => github.com/haarchri/crossplane-runtime v0.21.0-rc.0.0.20230801-e147d407d7eddcd57891fc85d68315c1917d072f
apply the following resources: