)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6445c427f4b6a52b11fdbf47684413ef260154b9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        Installed Size: 1024 MB (Double-bank Connection)"},{"line_number":27,"context_line":"        Enabled Size: 1024 MB (Double-bank Connection)"},{"line_number":28,"context_line":"        Size: No Module Installed"},{"line_number":29,"context_line":"        Size: 1024 MB"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Common strings like \"No Module Installed\" and \"Not Installed\" are"},{"line_number":32,"context_line":"normal. These two strings are hard coded in the before mentioned"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dae33548_b31e025d","line":29,"updated":"2016-02-17 10:45:49.000000000","message":"could you please modify unit tests to use this example? I suspect it won\u0027t work properly due to both \"double-bank\" thing and due to installed vs enabled.","commit_id":"b43f2757d8d56065a8bcf0ade3c3c4c97b6cd59a"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"06e5e5ce59cca3e11a53328debb7c721025ee39e","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            total \u003d int(psutil.phymem_usage().total)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        try:"},{"line_number":424,"context_line":"            out, _e \u003d utils.execute(\"dmidecode --type memory | grep Size\","},{"line_number":425,"context_line":"                                    shell\u003dTrue)"},{"line_number":426,"context_line":"        except (processutils.ProcessExecutionError, OSError) as e:"},{"line_number":427,"context_line":"            LOG.warning(\"Cannot get real physical memory size: %s\", e)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_eee9bde7","line":424,"range":{"start_line":424,"start_character":54,"end_line":424,"end_character":60},"updated":"2016-02-17 11:06:58.000000000","message":"we should probably use type 17 only here, then we won\u0027t get obsolete \"installed size\" records.","commit_id":"b43f2757d8d56065a8bcf0ade3c3c4c97b6cd59a"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"5721e3843ccb9e7f66b71cb00af89b0450f18c3a","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                if not line:"},{"line_number":434,"context_line":"                    continue"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"                value \u003d \"\""},{"line_number":437,"context_line":"                try:"},{"line_number":438,"context_line":"                    value \u003d line.split(\u0027:\u0027, 1)[1].strip()"},{"line_number":439,"context_line":"                    physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_b380c2f8","line":436,"updated":"2016-02-17 10:56:46.000000000","message":"why not value \u003d None?","commit_id":"b43f2757d8d56065a8bcf0ade3c3c4c97b6cd59a"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"5721e3843ccb9e7f66b71cb00af89b0450f18c3a","unresolved":false,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"                value \u003d \"\""},{"line_number":437,"context_line":"                try:"},{"line_number":438,"context_line":"                    value \u003d line.split(\u0027:\u0027, 1)[1].strip()"},{"line_number":439,"context_line":"                    physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"},{"line_number":440,"context_line":"                except Exception as exc:"},{"line_number":441,"context_line":"                    if (value \u003d\u003d \"No Module Installed\" or"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_73147a9f","line":438,"updated":"2016-02-17 10:56:46.000000000","message":"imho, there should be an additional check for text before \u0027:\u0027.\nonly rows with \"Size: \u003cvalue\u003e\" should be counted.\nit works implicitly with examples from the bug report but would return incorrect result for input like: \n\nInstalled Size: 1024 MB\nSize: 1024 MB","commit_id":"b43f2757d8d56065a8bcf0ade3c3c4c97b6cd59a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6445c427f4b6a52b11fdbf47684413ef260154b9","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                    if (value \u003d\u003d \"No Module Installed\" or"},{"line_number":442,"context_line":"                            value \u003d\u003d \"Not Installed\"):"},{"line_number":443,"context_line":"                        LOG.warning(\u0027Cannot parse size expression %s: %s\u0027,"},{"line_number":444,"context_line":"                                    line, exc)"},{"line_number":445,"context_line":"                    else:"},{"line_number":446,"context_line":"                        LOG.error(\u0027Cannot parse size expression %s: %s\u0027,"},{"line_number":447,"context_line":"                                  line, exc)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_532df693","line":444,"updated":"2016-02-17 10:45:49.000000000","message":"this should not be even a warning, I think","commit_id":"b43f2757d8d56065a8bcf0ade3c3c4c97b6cd59a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"246ea1593441dd4259cc6c473eb535e5e6946760","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                if not line:"},{"line_number":434,"context_line":"                    continue"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"                if \"Size:\" in line:"},{"line_number":437,"context_line":"                    value \u003d None"},{"line_number":438,"context_line":"                    try:"},{"line_number":439,"context_line":"                        value \u003d line.split(\u0027Size:\u0027, 1)[1].strip().split()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_3c823c53","line":436,"range":{"start_line":436,"start_character":16,"end_line":436,"end_character":35},"updated":"2016-02-19 15:47:25.000000000","message":"this can be inverted to reduce indentation:\n\n if \u0027Size:\u0027 not in line:\n   continue","commit_id":"a82c0bc910c7e1df20c0564401185b4a6507140b"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"7c174249a62fee3383dfe4dfc2d9114f5f6322a4","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                if \"Size:\" in line:"},{"line_number":437,"context_line":"                    value \u003d None"},{"line_number":438,"context_line":"                    try:"},{"line_number":439,"context_line":"                        value \u003d line.split(\u0027Size:\u0027, 1)[1].strip().split()"},{"line_number":440,"context_line":"                        value \u003d \u0027 \u0027.join(value[:2])"},{"line_number":441,"context_line":"                        physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"},{"line_number":442,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_3c099596","line":439,"updated":"2016-02-19 17:49:10.000000000","message":"Why not simply line.split(\u0027Size: \u0027, 1) and without the strip()? Have you seen some case where there was something more than a single whitespace after the colon?","commit_id":"a82c0bc910c7e1df20c0564401185b4a6507140b"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"7c174249a62fee3383dfe4dfc2d9114f5f6322a4","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                    value \u003d None"},{"line_number":438,"context_line":"                    try:"},{"line_number":439,"context_line":"                        value \u003d line.split(\u0027Size:\u0027, 1)[1].strip().split()"},{"line_number":440,"context_line":"                        value \u003d \u0027 \u0027.join(value[:2])"},{"line_number":441,"context_line":"                        physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"},{"line_number":442,"context_line":"                    except Exception as exc:"},{"line_number":443,"context_line":"                        if (value \u003d\u003d \"No Module Installed\" or"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_3c651545","line":440,"updated":"2016-02-19 17:49:10.000000000","message":"I guess you split/join here to select first two fields from the value but again, have you seen some *valid* lines which have more than two fields? I\u0027d simply take the line with \u0027Size: \u0027 stripped as the value.","commit_id":"a82c0bc910c7e1df20c0564401185b4a6507140b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"246ea1593441dd4259cc6c473eb535e5e6946760","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                        value \u003d \u0027 \u0027.join(value[:2])"},{"line_number":441,"context_line":"                        physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"},{"line_number":442,"context_line":"                    except Exception as exc:"},{"line_number":443,"context_line":"                        if (value \u003d\u003d \"No Module Installed\" or"},{"line_number":444,"context_line":"                                value \u003d\u003d \"Not Installed\"):"},{"line_number":445,"context_line":"                            LOG.info(\u0027Cannot parse size expression %s: %s\u0027,"},{"line_number":446,"context_line":"                                     line, exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_5c87400f","line":443,"range":{"start_line":443,"start_character":38,"end_line":443,"end_character":57},"updated":"2016-02-19 15:47:25.000000000","message":"As you\u0027re taking only first 2 words, it will be \"No Module\" actually","commit_id":"a82c0bc910c7e1df20c0564401185b4a6507140b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"246ea1593441dd4259cc6c473eb535e5e6946760","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    except Exception as exc:"},{"line_number":443,"context_line":"                        if (value \u003d\u003d \"No Module Installed\" or"},{"line_number":444,"context_line":"                                value \u003d\u003d \"Not Installed\"):"},{"line_number":445,"context_line":"                            LOG.info(\u0027Cannot parse size expression %s: %s\u0027,"},{"line_number":446,"context_line":"                                     line, exc)"},{"line_number":447,"context_line":"                        else:"},{"line_number":448,"context_line":"                            LOG.error(\u0027Cannot parse size expression %s: %s\u0027,"},{"line_number":449,"context_line":"                                      line, exc)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_5cb0e0f4","line":446,"range":{"start_line":445,"start_character":28,"end_line":446,"end_character":47},"updated":"2016-02-19 15:47:25.000000000","message":"Now I think we should not report anything in this case. Or do something like:\n\n LOG.debug(\u0027One memory slot is empty\u0027)","commit_id":"a82c0bc910c7e1df20c0564401185b4a6507140b"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"869addd2cad0abb73de9aa1e40bb678264a20fa0","unresolved":false,"context_lines":[{"line_number":441,"context_line":"                    value \u003d line.split(\u0027Size: \u0027, 1)[1]"},{"line_number":442,"context_line":"                    physical +\u003d int(UNIT_CONVERTER(value).to_base_units())"},{"line_number":443,"context_line":"                except Exception as exc:"},{"line_number":444,"context_line":"                    if (value \u003d\u003d \"No Module\" or"},{"line_number":445,"context_line":"                            value \u003d\u003d \"Not Installed\"):"},{"line_number":446,"context_line":"                        LOG.debug(\u0027One memory slot is empty\u0027)"},{"line_number":447,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_7287b90f","line":444,"updated":"2016-02-19 22:57:43.000000000","message":"this should be back to \"No Module Installed\"","commit_id":"76483f6aa2d591bc665b7419f8fabb0863d7844e"}],"ironic_python_agent/tests/unit/test_hardware.py":[{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"909b8755765b5db3677b1b29f99242d5bde94ba2","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        mem \u003d self.hardware.get_memory()"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        self.assertEqual(3952 * 1024 * 1024, mem.total)"},{"line_number":441,"context_line":"        self.assertEqual(6144, mem.physical_mb)"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    def test_list_hardware_info(self):"},{"line_number":444,"context_line":"        self.hardware.list_network_interfaces \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_bcf8fa7d","line":441,"updated":"2016-02-19 22:02:31.000000000","message":"as far as I checked, this should still report 4096","commit_id":"b8d782b607e271b29326b935ac1def25254c7a9a"}],"releasenotes/notes/add-unit-test-cc4a1a05859ad17d.yaml":[{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"909b8755765b5db3677b1b29f99242d5bde94ba2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    - Added missing unit tests to cover common strings"},{"line_number":4,"context_line":"      for getting memory from dmidecode output."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bae84128_7ce792e4","line":4,"updated":"2016-02-19 22:02:31.000000000","message":"The release note should say something about the functionality change/bug fix. IMHO, end users are not very interested in unit tests. \nAlso this should go under \"fixes\" not \"prelude\" (see: http://docs.openstack.org/developer/reno/usage.html#editing-a-release-note)","commit_id":"b8d782b607e271b29326b935ac1def25254c7a9a"},{"author":{"_account_id":20312,"name":"Jacek Tomasiak","email":"jacek.tomasiak@gmail.com","username":"skazi"},"change_message_id":"427a3e14fbb34ced6b95f0e1ac2407dcafb45a1f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes: \u003e"},{"line_number":3,"context_line":"    - dmidecode output produces less parsing errors and logs"},{"line_number":4,"context_line":"      common and normal output like \"No Module Installed\" or "},{"line_number":5,"context_line":"      \"Not Installed\" in debug instead of error."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"bae84128_1bf757f6","line":2,"range":{"start_line":2,"start_character":7,"end_line":2,"end_character":8},"updated":"2016-02-20 17:38:57.000000000","message":"remove this \"\u003e\" otherwise the output will look like this: http://docs-draft.openstack.org/70/280970/4/check/gate-ironic-python-agent-releasenotes/f65ea91//releasenotes/build/html/current-series.html#bug-fixes (output of gate-ironic-python-agent-releasenotes check)\n\nalso make sure there are no whitespaces at the ends of lines","commit_id":"76483f6aa2d591bc665b7419f8fabb0863d7844e"}]}
