If unknown properties are submitted in a json posted to marathon, this should be validated at validation endpoint.
Depends on D698
If unknown properties are submitted in a json posted to marathon, this should be validated at validation endpoint.
Depends on D698
sbt test
No Linters Available |
No Unit Test Coverage |
Buildable 2210 | |
Build 4174: Marathon (deprecated) | Velocity Results |
Build 4173: arc lint + arc unit |
I'm not sure why we would want non-strict mode... so with that in mind, if we only use strict, can we remove the stack/dependency too?
changelog.md | ||
---|---|---|
65 | I feel like this should be a separate change item. | |
project/RamlTypeGenerator.scala | ||
14 | I didn't link the comments from the previous review. Why is the valuable information? | |
488 | We should _just_ have strict mode no?! | |
492 | Why do we want non-strict mode ever? |
project/RamlTypeGenerator.scala | ||
---|---|---|
14 | It took me around 30 minutes to figure out that I need to do sbt reload and I wanted to prevent others from this loss of time. If this is not needed I can remove it. On current master you need more then reload, right? There were some kind of caching added. What do I need to do correctly? I did clean, but probably this is too much, right? | |
492 | It`s a breaking change. I can not make the decision to change the default. If we want to have it, @meichstedt or someone from the product team need to make this decision. I asked @meichstedt to discuss it. A plan could be to announce this with 1.5 and the validation endpoint and then remove the non-strict way. |
project/RamlTypeGenerator.scala | ||
---|---|---|
14 | I guess I just thought this was totally obvious since its part of the project itself and all of those files need a reload. I don't believe the caching needs to change, but we could record the last modified time of this file to see if the cache is invalid anyways. | |
492 | I thought the JIRA for this already said that our current behavior is actually a bug and I feel like I recently saw an issue come up where the user was confused. I don't think its actually breaking since we don't preserve the information anyways... @jdef ? If anything, I'd love to see "allowDeprecated" as an option so we can warn in the validation endpoint. |
changelog.md | ||
---|---|---|
65 | the summary and title of this changeset mentioned the new validation endpoint. This comment mentions /v2/apps. Confusing at best, likely something is wrong somewhere | |
project/RamlTypeGenerator.scala | ||
14 | FWIW I've never had to sbt reload to pick up changes to this file | |
487 | please provide some sample scala output generated by these changes | |
492 | (a) it's potentially "breaking" if you try to install a universe package that has a marathon.json template w/ bogus fields. or if Alice or Dan has some custom tooling/scripting that's been getting away with submitting bad JSON to marathon -- that tooling will now break if we always enforce strict mode. I think that I can live with that as long as we thoroughly call this out as a potentially breaking change in the changelog. since marathon 1.5 should only ever emit valid JSON fields .. I think I'm ok with this kind of breaking change. the only edge case that I can think of is that Alice or Dan queries a groups endpoint, and tries to feed the json back into Marathon. that's going to break w/ strict field validation because the groups endpoint potentially embeds lots of fields that are really part of, for example, an AppInfo type, and not App. should we be worried about this? maybe... or maybe not: users that want to do this are already faced with the prospect that marathon 1.4 and prior output JSON that can't be fed back into Marathon without cleanup because in 1.4 and prior Marathon actually populates deprecated fields upon serialization -- a practice that has already stopped with Marathon 1.5 (b) yes, i'd also rather see a flag to toggle on/off support for deprecated fields. in a separate PR, probably tracked by a separate JIRA |
I feel like this should be a separate change item.