Skip to content
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

CloudFormation wrapper panics are reported as failures (closes #172) #174

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

aidansteele
Copy link
Contributor

Issue #172

If a CloudFormation custom resource function panics, we send a FAILED status to cfn. Panics are not recovered, as this would cause the stacktrace to be lost before being handled here:

if err := recover(); err != nil {
panicInfo := getPanicInfo(err)
response.Error = &messages.InvokeResponse_Error{
Message: panicInfo.Message,
Type: getErrorType(err),
StackTrace: panicInfo.StackTrace,
ShouldExit: true,
}
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Panics are not recovered, as this would cause the stacktrace to be lost by
handlers higher in the stack that are yet to be unwound.
@codecov-io
Copy link

codecov-io commented Mar 9, 2019

Codecov Report

Merging #174 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #174     +/-   ##
=========================================
+ Coverage   70.02%   70.33%   +0.3%     
=========================================
  Files          18       18             
  Lines         684      691      +7     
=========================================
+ Hits          479      486      +7     
  Misses        165      165             
  Partials       40       40
Impacted Files Coverage Δ
cfn/wrap.go 92.59% <100%> (+2.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec2fec7...7f5322c. Read the comment docs.

Copy link
Collaborator

@bmoffatt bmoffatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bmoffatt bmoffatt merged commit fec1e14 into aws:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants