Skip to content

Conversation

saschagrunert
Copy link
Member

If the map is nil, then the assignment of

valErrMap[filename] = append(valErrMap[filename], err)

will cause a runtime panic. This has been fixed by pre-initialization of
the map, whereas the errors are now reported correctly.

If the map is `nil`, then the assignment of

```go
valErrMap[filename] = append(valErrMap[filename], err)
```

will cause a runtime panic. This has been fixed by pre-initialization of
the map, whereas the errors are now reported correctly.

Signed-off-by: Sascha Grunert <[email protected]>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 5, 2021
@saschagrunert saschagrunert changed the title Init valErrMap on Validate() Init valErrMap on `Validate() May 5, 2021
@k8s-ci-robot k8s-ci-robot added the area/enhancements Issues or PRs related to the Enhancements subproject label May 5, 2021
@saschagrunert saschagrunert changed the title Init valErrMap on `Validate() Init valErrMap on Validate() May 5, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 5, 2021
@wojtek-t
Copy link
Member

wojtek-t commented May 5, 2021

/lgtm
/approve

xref: #2672

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 5, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saschagrunert, wojtek-t
To complete the pull request process, please assign jeremyrickard after the PR has been reviewed.
You can assign the PR to them by writing /assign @jeremyrickard in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ehashman
Copy link
Member

ehashman commented May 5, 2021

Fixed in the above PR ^

@ehashman ehashman closed this May 5, 2021
@saschagrunert saschagrunert deleted the validate branch May 5, 2021 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/enhancements Issues or PRs related to the Enhancements subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants