-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36459/#review91553
-----------------------------------------------------------

Ship it!


For those not terribly familiar with pystachio, this fixes it because the 
`json_loads` function in `Struct` will filter, but the routine prior to this 
diff does not:

```
  def json_loads(cls, json_string, strict=False):
    return cls(json.loads(json_string) if strict
               else cls._filter_against_schema(json.loads(json_string)))
```

https://github.com/wickman/pystachio/blob/6a9518fbb6b5732edf3112b76b9e70c0fa693877/pystachio/composite.py#L290-L293

- Bill Farner


On July 13, 2015, 10:53 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36459/
> -----------------------------------------------------------
> 
> (Updated July 13, 2015, 10:53 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Fix AuroraConfigLoader schema filtering when loading from string.
> 
> We have an internal tool that needs to serialize configs into a string and 
> retrieve them from stable storage.  We had deployed a client containing 
> shutdown_endpoint then reverted it in https://reviews.apache.org/r/35847/ but 
> unfortunately deserialization broke the internal tool since it was not 
> filtering out the unknown attributes.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/config/loader.py 
> c8b045e9a668199feee0ac3cee9fac55fe09cf08 
>   src/test/python/apache/aurora/config/test_loader.py 
> 00b6eabadb8f4e40aba1191068e1ca04c78d1ff3 
> 
> Diff: https://reviews.apache.org/r/36459/diff/
> 
> 
> Testing
> -------
> 
> Added test, it broke.  Fixed code, tests passed.
> 
> Also updated tests to not create files when not necessary.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>

Reply via email to