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
asserts, snapstate: return full validation set keys from CheckPresenceRequired and CheckPresenceInvalid #10774
asserts, snapstate: return full validation set keys from CheckPresenceRequired and CheckPresenceInvalid #10774
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10774 +/- ##
==========================================
- Coverage 78.33% 78.32% -0.02%
==========================================
Files 890 890
Lines 100198 100205 +7
==========================================
- Hits 78488 78483 -5
- Misses 16792 16804 +12
Partials 4918 4918
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM, but those error returns you added are not covered by unit tests. I'm not sure if they need to be covered -- just pointing that out in case you forgot about them. :-)
No, I didn't forget about them but as with most internal errors, they would be hard/impossible to test because they could only occur if we had a bug somewhere and our structs were not consistent, we usually don't test such cases. |
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.
thanks, small detail about Ref vs At
if vs == nil { | ||
return nil, unspecifiedRevision, fmt.Errorf("internal error: no validation set for %q", rc.validationSetKey) | ||
} | ||
keys = append(keys, strings.Join(vs.At().PrimaryKey, "/")) |
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.
s/At/Ref/ works as well and is more typical for this use case
if vs == nil { | ||
return nil, fmt.Errorf("internal error: no validation set for %q", rc.validationSetKey) | ||
} | ||
keys = append(keys, strings.Join(vs.At().PrimaryKey, "/")) |
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.
same
0793b96
to
1332ada
Compare
CheckPresenceInvalid; full keys including series and sequence are expected by store api.
1332ada
to
37e4b21
Compare
Return full validation set keys from CheckPresenceRequired and CheckPresenceInvalid. Full keys including series and sequence are expected by store api.