error log serialization errors and return nil
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
-
A short explanation of the proposed change: This would allow users to retrieve applications without environment variables causing problems. Hypothetically this error should never be thrown, but if it is, then it's likely not something we can recover the environment variables that were there before. It's maybe better to treat them like they just got wiped out. This does not preclude work to try and fix how we got it corrupted, but we couldn't reproduce.
-
An explanation of the use cases your change solves We're trying to look into a interesting problem. What seems to have happened, although we can't identify the cause, is that the environment variables of an application got corrupted. Specifically, it went from json in the db to a null terminated string that isn't json. We never got the specific data.
This causes extreme platform instability from a certain perspective. Specifically, it causes inability to read all the applications from the platform. Anything scanning /v2/apps will be unable to obtain all the applications without randomly getting an error partway through if any application's environment variables are corrupted.
-
Links to any other associated PRs
-
[x] I have reviewed the contributing guide
-
[x] I have viewed, signed, and submitted the Contributor License Agreement
-
[x] I have made this pull request to the
mainbranch -
[x] I have run all the unit tests using
bundle exec rake -
[ ] I have run CF Acceptance Tests