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

fix: Validate required fields in PlanResourcesRequest #1262

Merged
merged 1 commit into from Oct 5, 2022

Conversation

haines
Copy link
Member

@haines haines commented Oct 5, 2022

PlanResourcesRequest is missing a couple of validation rules, meaning that you get a nil pointer dereference when you omit the resource field instead of an invalid argument.

Signed-off-by: Andrew Haines <haines@cerbos.dev>
@haines haines added the kind/bug Something isn't working label Oct 5, 2022
@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Merging #1262 (510de1d) into main (d35341e) will increase coverage by 0.22%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1262      +/-   ##
==========================================
+ Coverage   55.96%   56.19%   +0.22%     
==========================================
  Files         109      109              
  Lines       12375    12375              
==========================================
+ Hits         6926     6954      +28     
+ Misses       4886     4857      -29     
- Partials      563      564       +1     
Impacted Files Coverage Δ
internal/engine/engine.go 63.94% <0.00%> (+0.72%) ⬆️
internal/storage/index/builder.go 84.46% <0.00%> (+7.28%) ⬆️
internal/compile/errors.go 51.56% <0.00%> (+15.62%) ⬆️

Copy link
Contributor

@charithe charithe left a comment

Choose a reason for hiding this comment

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

👍🏽

@haines haines merged commit 6d7deef into cerbos:main Oct 5, 2022
@haines haines deleted the validate-plan-resources-request branch October 5, 2022 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants