Week of Apr 6#454
Conversation
| Enforcement](./primer.md#singleversionroot-policy-enforcement) section of | ||
| the Primer for more information. | ||
|
|
||
| ### `groups.<STRING>.resources.<STRING>.validateformat` |
There was a problem hiding this comment.
Just moved up - no changes
e3e18cd to
db48248
Compare
| the `meta.compatibility` value for that Resource's `format` value. | ||
| See [`strictvalidation`](#groupsstringresourcesstringstrictvalidation) for | ||
| exceptions to this requirement. | ||
| - When a Version does not have a `format` value then compatibility verification |
There was a problem hiding this comment.
So if validatecompat is true, but format is missing, should that raise an error?
There was a problem hiding this comment.
If "format" is missing, it's basically saying "turn off format/compat validation for this version". So, no it doesn't raise an error.
I struggled with the location for text (model vs spec), but in the core spec w.r.t. the "compatvalidated" attribute it says this:
- MUST NOT be present if the Resource model's `validatecompatibility`
attribute is `false`, or the Version's `format` value is absent, or the
Resource's `meta.compatibility` attribute is absent.
| A value of `"true"` indicates that the server has validated the Version and | ||
| it adheres to the `format` attribute's rules. | ||
|
|
||
| A value that starts with `false` indicates that the server did not attempt |
There was a problem hiding this comment.
So is the format just false because I felt like it or is there more structure, e.g. false (reason here)?
There was a problem hiding this comment.
I wasn't sure how picky I should be about the shape of the text. I tried to stick with just "true" vs "false.*" (just first 5 chars matter). Is that ok? I was torn between human readable sentence and from machine parse-able (e.g. your false (reason here)), and decided to leave that as an impl choice.
|
|
||
| - Examples: | ||
| - `"true"` | ||
| - `"false, unknown format"` |
There was a problem hiding this comment.
This answers my earlier question - I'm not particularly comfortable with it though. I'd personally prefer a more structured approach, keeping formatvalidated as a Boolean, and having a separate formatvalidationdetail attribute. The idea of any user code needing to check whether a value starts with false feels icky to me.
There was a problem hiding this comment.
I share the concern, and we did talk about this a bit. For me, I think the overriding factor was that I didn't want to introduce "yet another" attribute when it pretty much goes "hand in hand" (ie required) with the "false". The other thought I had was that when it's a boolean it'll be too easy for people to only look at the boolean, ignore the text, and mentally think of "false" as the same thing as "invalid". Which it's not. "false" means "I didn't check". And seeing the other text right next to the "false" increases the chances of people reading it and realizing the server didn't even try.
Perhaps true/false is part of the problem. Maybe we should not try to squeeze a boolean into a string - but if we don't, I think it makes it even parse for a machine to know what's going on. At least now they can parse the first few chars to get a quick answer.
There was a problem hiding this comment.
If this were a project I were more deeply invested in, I'd definitely push back on this. I don't think there's significant cost to an extra attribute, and it would be easier to use. But given that I don't have skin in the game, I'll let y'all decide :)
|
|
||
| #### `compatibilityvalidated` Attribute | ||
| - Type: Boolean | ||
| - Type: String |
- add 'consistentformat' to Resource model - make the default value for the validation flags 'false' - make schema registry be true/strict wrt all 4 format/compat flags Signed-off-by: Doug Davis <duglin@gmail.com>
|
Summary: |
|
Approved on the 4/16 call |
Fixes #453