-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix coverage #63
Fix coverage #63
Conversation
@@ -147,6 +147,12 @@ func NewPassReport(plan *tfjson.Plan) types.PassReport { | |||
} | |||
|
|||
func NewCoverageReportFromState(state *tfjson.State) (coverage.CoverageReport, error) { | |||
defer func() { | |||
if r := recover(); r != nil { |
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.
Is it possible to fix the panic instead of calling the cover()
?
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.
This is to prevent the main process (which validates and generates the pass report) from crashing if the coverage report fails to generate. The coverage report might fail to generate due to the following reasons:
- The index file cannot be downloaded.
- The online swagger file cannot be downloaded.
- The swagger ref or variant cannot be correctly processed.
x-ms-discriminator-value extension
is not usedindex.zip
instead ofindex.json
file and reduce its file size from 50MB to 2MB.