)]}'
{"sushy/resources/base.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"bb95efff75d27ce68595887b8cfa36ce15ea567d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_6080369d","line":104,"updated":"2020-01-28 11:14:31.000000000","message":"shouldn\u0027t we keep the None (python None) check? otherwise we\u0027ll stop accepting null as a valid value for adapter\u003dint, for example?","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"47c07858360495e15683ada4908c9d7a6e8a2f92","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_466672f0","line":104,"in_reply_to":"3fa7e38b_400ada26","updated":"2020-01-28 12:28:25.000000000","message":"Try int(None) in your Python console :)","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"cfa5e9e3e98809537e14e7d92f33261cf0cfd474","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_66d4ce4b","line":104,"in_reply_to":"3fa7e38b_466672f0","updated":"2020-01-28 12:36:01.000000000","message":"I have two observations to note here:\n\n1. This adapter callable is seemingly designed to process any data type that makes sense for the `Field`. None, being the instance of NoneType, is a first-class citizen  as much as `int` is.\n\n2. Since we expect non-initialized integer fields in Redfish JSON documents that end up being None, we have `utils.int_or_none` function in sushy to accommodate that.","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"359298aacef16fbc35b9e24df93a31479779cc8c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_7d0dd03e","line":104,"in_reply_to":"3fa7e38b_4f7dc91c","updated":"2020-02-05 00:04:07.000000000","message":"The conundrum then comes with maintaining the test matrix. because they are constantly moving targets and null values will still appear. I think the null check needs to remain, but that just comes from ansible string-\u003eyaml-\u003epython parsing pain of the past which occurred in the pursuit of world domination.\n\nCould _adapter() have \"If None, return None\" logic? Just a thought since the bug seems to be that we functionally ignore, but it seems we need to take a path in the  middle.","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"36d4d78f1825d7651e915441c747af4de3a983e1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_400ada26","line":104,"in_reply_to":"3fa7e38b_6080369d","updated":"2020-01-28 11:21:05.000000000","message":"Is it the other way round? We start accepting None as an input for the `_adapter`, right? I am not sure why should not we?","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94febbb816606cd326f7308ab537e77f2d25ef24","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_e62d1e45","line":104,"in_reply_to":"3fa7e38b_66d4ce4b","updated":"2020-01-28 12:41:28.000000000","message":"As you rightfully notice in #2, None is special, so any adapter must handle it. I\u0027m afraid it will be the cause of errors if people forget to introduce list_or_none, dict_or_none, etc.\n\nBy the way, do you plan on changing all places where we have adapter\u003dlist?","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a643de4010282b56ebd249641fc0589d0101232d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4f7dc91c","line":104,"in_reply_to":"3fa7e38b_9439f0a2","updated":"2020-02-04 11:03:28.000000000","message":"\u003e Well, JSON null becomes None in Python, right?\n\nYes.\n\n\u003e You\u0027re asking good questions. I don\u0027t know if we should accept null when it\u0027s not explicitly declared as part of an item\u0027s type.\n\nI\u0027d consider that a schema violation.\n\nWith the approach being proposed, we could work-around specific broken fields by adding `adaptor\u003d\u003ccallable\u003e` to model property in the same way as we will do for other schema violations. In this case, the `callable` can be `int_or_none`-like fuzziness.\n\nYou see, the difference relative to the current code is that we won\u0027t blindly accept all `null` values where we actually hoping for `int`.\n\n\u003e I\u0027m afraid that, given how loosely the standard is sometimes interpreted, we are going to see null values for any optional fields.\n\nI am pretty sure that with time (unfortunately, taking over the world takes time) we will encounter asymptotically full set of possible combinations of messiness!\n\nOne thing that bothers me is this: when it comes to the standard Redfish schema, the workaround we introduce in sushy hardcode (e.g. `adaptor\u003d\u003ccallable\u003e`) for vendor X may eventually collide with workaround that\u0027s required for vendor Y. Of course, we could hop on the bandwagon  of branching hacks by vendor ID, then by firmware version in sushy core... :-(\n\nI\u0027d be more confident in the brightness of the future if the user could somehow inject or enable a workaround to match their specific vendor/firmware madness. Possibly by supplying something through process environment or an optional sushy configuration file with overrides....","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0e5715dd7466f1b63a9bb805fd05fe35eb3b9f66","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_9439f0a2","line":104,"in_reply_to":"3fa7e38b_c68b4214","updated":"2020-01-28 14:20:49.000000000","message":"Well, JSON null becomes None in Python, right?\n\nYou\u0027re asking good questions. I don\u0027t know if we should accept null when it\u0027s not explicitly declared as part of an item\u0027s type.\n\nI\u0027m afraid that, given how loosely the standard is sometimes interpreted, we are going to see null values for any optional fields.","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"22f10550a2017d5a900cb6cd15e0b3e754494674","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                # Do not run the adapter on the default value"},{"line_number":102,"context_line":"                return self._default"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            value \u003d self._adapter(item)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        except (UnicodeError, ValueError, TypeError) as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_c68b4214","line":104,"in_reply_to":"3fa7e38b_e62d1e45","updated":"2020-01-28 13:00:22.000000000","message":"\u003e As you rightfully notice in #2, None is special, so any adapter must handle it. I\u0027m afraid it will be the cause of errors if people forget to introduce list_or_none, dict_or_none, etc.\n\nActually, when this adapter gets None on input? t seems only when it\u0027s JSON null. Should we tolerate JSON null for (say) a list or an int field?\n\n\u003e By the way, do you plan on changing all places where we have adapter\u003dlist?\n\nMay be it\u0027s the other way round again - can we drop this `int_or_none` function altogether?","commit_id":"6e1a9f3331891bf54ec85615797f85b2af697769"}]}
