)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a478d41f_4e3881b2","updated":"2022-02-07 09:41:39.000000000","message":"couple of initial comments mostly around structure","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0a6d484e_017fed96","updated":"2022-02-16 10:20:57.000000000","message":"nice progress. I\u0027ve left some comments inline","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"37657f47128c37a0427176d694bf37e3efc96396","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"de902dd5_cdc69da0","updated":"2023-01-21 00:25:18.000000000","message":"Mostly just a rebase for now, minor comments addressed.","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"f436ade121a220f28680e5684477932e2a50b293","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"a2413772_ee5bf0ea","updated":"2023-05-19 13:47:09.000000000","message":"need to updated workflow -1 in all","commit_id":"917649f8ac7cd8cf293512d97aed9a82c6ae1aba"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"075b11044a09ab691ffef3548d5c863802ac85f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"693fbff6_89d7be70","updated":"2023-05-19 15:40:18.000000000","message":"recheck multiple test failed in nova-ceph-multistore (unrelated)","commit_id":"917649f8ac7cd8cf293512d97aed9a82c6ae1aba"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"88e4d2538a0993d5e993296d15e4b0926298232b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"8145394e_7c05ac3f","updated":"2023-05-20 05:56:20.000000000","message":"recheck multiple test failed in nova-ceph-multistore (unrelated)","commit_id":"917649f8ac7cd8cf293512d97aed9a82c6ae1aba"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5f6b280f04843bc7713a199817626d4aacc88a66","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"7b542afd_863c29e2","updated":"2023-10-13 10:24:54.000000000","message":"thanks for the review ill get back to this next week","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"acfd87ee_f6a14792","updated":"2024-02-09 16:23:46.000000000","message":"Still reading up the stack, but here are some early comments.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"368e302d_b093272e","updated":"2024-02-13 10:14:35.000000000","message":"thanks i need to respin this patch anyway to add an overall timestamp to the resouce based on other feedback and its now in merge conflcit so setting this to -w unitl i have time to get back to it.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":21,"id":"7cd95c07_da66f5f8","updated":"2024-08-27 10:49:36.000000000","message":"Left couple of new comments.\n\nAlso in the previous round of review we seem to be agreed (at least with Dan) that there are a list of python complexities that feels too much for this simple logic (like the frozen class, dataclass, singledispatch), but I still see them in the code, so I\u0027m not sure any more where we are with the simplification.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"addf148727dc50e99774929e3a8111292f554a82","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":21,"id":"41adf015_a63ed471","in_reply_to":"7cd95c07_da66f5f8","updated":"2024-08-27 11:57:22.000000000","message":"ya i dont think we had really come to an agreement on that at least you did not convicne me that it shoudl be simplifed.\n\nwith that said this was just a rebase of the previous version.\n\ni started working on adress ing some of the comment locally but got pull into other work so i have not pushed that.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"}],"nova/conf/healthcheck.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":39,"context_line":"Note: at present scheme must be tcp, unix socket support will be"},{"line_number":40,"context_line":"added in a future version of nova. the host value can be any valid"},{"line_number":41,"context_line":"rfc3986 ipv4, ipv6 address or a local hostname such as localhost or the"},{"line_number":42,"context_line":"value of ``conf.host``. binding to 0.0.0.0 or a publicly routable ip"},{"line_number":43,"context_line":"is not recommended but is supported."},{"line_number":44,"context_line":"\"\"\"),"},{"line_number":45,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":3,"id":"d8f16ac4_2bef6746","line":42,"range":{"start_line":42,"start_character":24,"end_line":42,"end_character":25},"updated":"2022-02-07 09:41:39.000000000","message":"nit: Binding","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"Note: at present scheme must be tcp, unix socket support will be"},{"line_number":40,"context_line":"added in a future version of nova. the host value can be any valid"},{"line_number":41,"context_line":"rfc3986 ipv4, ipv6 address or a local hostname such as localhost or the"},{"line_number":42,"context_line":"value of ``conf.host``. binding to 0.0.0.0 or a publicly routable ip"},{"line_number":43,"context_line":"is not recommended but is supported."},{"line_number":44,"context_line":"\"\"\"),"},{"line_number":45,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":3,"id":"7b52ccfe_849e6dc0","line":42,"range":{"start_line":42,"start_character":24,"end_line":42,"end_character":25},"in_reply_to":"d8f16ac4_2bef6746","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":58,"context_line":"        min\u003d-1,"},{"line_number":59,"context_line":"        help\u003d\"\"\""},{"line_number":60,"context_line":"The cache_control option can be set to -1, 0 or any posive number of seconds."},{"line_number":61,"context_line":"-1 will add ``Cache-Control: no-cache`` to the healthcheck responce"},{"line_number":62,"context_line":"0 disables the reporting of the Cache-Control header."},{"line_number":63,"context_line":"any positive value will be used to set ``Cache-Control: max-age\u003d\u003cvalue\u003e``"},{"line_number":64,"context_line":"by default if unset max age will be set to the value of the ttl config option."}],"source_content_type":"text/x-python","patch_set":3,"id":"63ab5972_169789f7","line":61,"range":{"start_line":61,"start_character":59,"end_line":61,"end_character":67},"updated":"2022-02-07 09:41:39.000000000","message":"nit: response","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        min\u003d-1,"},{"line_number":59,"context_line":"        help\u003d\"\"\""},{"line_number":60,"context_line":"The cache_control option can be set to -1, 0 or any posive number of seconds."},{"line_number":61,"context_line":"-1 will add ``Cache-Control: no-cache`` to the healthcheck responce"},{"line_number":62,"context_line":"0 disables the reporting of the Cache-Control header."},{"line_number":63,"context_line":"any positive value will be used to set ``Cache-Control: max-age\u003d\u003cvalue\u003e``"},{"line_number":64,"context_line":"by default if unset max age will be set to the value of the ttl config option."}],"source_content_type":"text/x-python","patch_set":3,"id":"74078fc0_8d065cea","line":61,"range":{"start_line":61,"start_character":59,"end_line":61,"end_character":67},"in_reply_to":"63ab5972_169789f7","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":67,"context_line":"        \"debug\","},{"line_number":68,"context_line":"        default\u003dFalse,"},{"line_number":69,"context_line":"        help\u003d\"\"\""},{"line_number":70,"context_line":"The healthcheck module does not log at debug level by default"},{"line_number":71,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":72,"context_line":"nova debug logging.\"\"\""},{"line_number":73,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"4c6c479a_3004c78c","line":70,"updated":"2022-02-07 09:41:39.000000000","message":"just curious, why?","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":true,"context_lines":[{"line_number":67,"context_line":"        \"debug\","},{"line_number":68,"context_line":"        default\u003dFalse,"},{"line_number":69,"context_line":"        help\u003d\"\"\""},{"line_number":70,"context_line":"The healthcheck module does not log at debug level by default"},{"line_number":71,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":72,"context_line":"nova debug logging.\"\"\""},{"line_number":73,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"7c87a085_f8f89a4f","line":70,"in_reply_to":"4c6c479a_3004c78c","updated":"2022-02-07 12:30:14.000000000","message":"we had a request in the ooo room either to have it log to becarful about what we log.\n\nmy concern here was this might be very verbose if i am logging every time a health check is updated in the ci given it runs a debug level.","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \"debug\","},{"line_number":68,"context_line":"        default\u003dFalse,"},{"line_number":69,"context_line":"        help\u003d\"\"\""},{"line_number":70,"context_line":"The healthcheck module does not log at debug level by default"},{"line_number":71,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":72,"context_line":"nova debug logging.\"\"\""},{"line_number":73,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"4ff37d5b_85e59ee7","line":70,"in_reply_to":"5496b6c4_bcecac44","updated":"2022-02-16 10:20:57.000000000","message":"Thanks.","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        \"debug\","},{"line_number":68,"context_line":"        default\u003dFalse,"},{"line_number":69,"context_line":"        help\u003d\"\"\""},{"line_number":70,"context_line":"The healthcheck module does not log at debug level by default"},{"line_number":71,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":72,"context_line":"nova debug logging.\"\"\""},{"line_number":73,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"5496b6c4_bcecac44","line":70,"in_reply_to":"7c87a085_f8f89a4f","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":true,"context_lines":[{"line_number":47,"context_line":"The time for which a health-check result is considered valid."},{"line_number":48,"context_line":"The default value is 300 seconds. If set to 0 health-check items will"},{"line_number":49,"context_line":"not expire."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"\"\"\"),"},{"line_number":52,"context_line":"    cfg.IntOpt("},{"line_number":53,"context_line":"        \"cache_control\","}],"source_content_type":"text/x-python","patch_set":14,"id":"ab7b5242_9005f5bc","line":50,"updated":"2023-10-13 09:10:00.000000000","message":"extra line","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"The time for which a health-check result is considered valid."},{"line_number":48,"context_line":"The default value is 300 seconds. If set to 0 health-check items will"},{"line_number":49,"context_line":"not expire."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"\"\"\"),"},{"line_number":52,"context_line":"    cfg.IntOpt("},{"line_number":53,"context_line":"        \"cache_control\","}],"source_content_type":"text/x-python","patch_set":14,"id":"b41e08af_3f539ac7","line":50,"in_reply_to":"ab7b5242_9005f5bc","updated":"2024-01-24 14:00:37.000000000","message":"Done","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":true,"context_lines":[{"line_number":51,"context_line":"\"\"\"),"},{"line_number":52,"context_line":"    cfg.IntOpt("},{"line_number":53,"context_line":"        \"cache_control\","},{"line_number":54,"context_line":"        default\u003dNone,"},{"line_number":55,"context_line":"        min\u003d-1,"},{"line_number":56,"context_line":"        help\u003d\"\"\""},{"line_number":57,"context_line":"The cache_control option can be set to -1, 0 or any positive number of seconds."}],"source_content_type":"text/x-python","patch_set":14,"id":"b2c4d538_916d7dbc","line":54,"updated":"2023-10-13 09:10:00.000000000","message":"should default cache be some +ve num or -1 (for no cache) instead of None","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"\"\"\"),"},{"line_number":52,"context_line":"    cfg.IntOpt("},{"line_number":53,"context_line":"        \"cache_control\","},{"line_number":54,"context_line":"        default\u003dNone,"},{"line_number":55,"context_line":"        min\u003d-1,"},{"line_number":56,"context_line":"        help\u003d\"\"\""},{"line_number":57,"context_line":"The cache_control option can be set to -1, 0 or any positive number of seconds."}],"source_content_type":"text/x-python","patch_set":14,"id":"c0ab0548_b1cc7270","line":54,"in_reply_to":"46207f07_c8ca5a49","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5f6b280f04843bc7713a199817626d4aacc88a66","unresolved":true,"context_lines":[{"line_number":51,"context_line":"\"\"\"),"},{"line_number":52,"context_line":"    cfg.IntOpt("},{"line_number":53,"context_line":"        \"cache_control\","},{"line_number":54,"context_line":"        default\u003dNone,"},{"line_number":55,"context_line":"        min\u003d-1,"},{"line_number":56,"context_line":"        help\u003d\"\"\""},{"line_number":57,"context_line":"The cache_control option can be set to -1, 0 or any positive number of seconds."}],"source_content_type":"text/x-python","patch_set":14,"id":"46207f07_c8ca5a49","line":54,"in_reply_to":"b2c4d538_916d7dbc","updated":"2023-10-13 10:24:54.000000000","message":"no because i am using None to mean somethign differnt then -1\n\nnone means dont sett the cache contol header at all.\n\ni could use -2 for that but this is cleaner IMO","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":true,"context_lines":[{"line_number":67,"context_line":"The health-check module does not log at debug level by default"},{"line_number":68,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":69,"context_line":"nova debug logging.\"\"\""},{"line_number":70,"context_line":"    )"},{"line_number":71,"context_line":"]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"_OPTS \u003d (healthcheck_opts)"}],"source_content_type":"text/x-python","patch_set":14,"id":"145cfcac_29dfda8c","line":70,"updated":"2023-10-13 09:10:00.000000000","message":"should this close in last line.\n`logging\"\"\")`\nor if in this line, in start of line.\n`\"\"\")`","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5f6b280f04843bc7713a199817626d4aacc88a66","unresolved":true,"context_lines":[{"line_number":67,"context_line":"The health-check module does not log at debug level by default"},{"line_number":68,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":69,"context_line":"nova debug logging.\"\"\""},{"line_number":70,"context_line":"    )"},{"line_number":71,"context_line":"]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"_OPTS \u003d (healthcheck_opts)"}],"source_content_type":"text/x-python","patch_set":14,"id":"72843b9f_f207d3c0","line":70,"in_reply_to":"145cfcac_29dfda8c","updated":"2023-10-13 10:24:54.000000000","message":"either works\nthe result will be the same more or less its just if we have an extra new line at the end or the string or not.\n\nill change them all to \n\n\"\"\"),\njust to be consitent but this is really just an asteic choice","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"The health-check module does not log at debug level by default"},{"line_number":68,"context_line":"To enable debug logging you must define this value in addition to enabling"},{"line_number":69,"context_line":"nova debug logging.\"\"\""},{"line_number":70,"context_line":"    )"},{"line_number":71,"context_line":"]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"_OPTS \u003d (healthcheck_opts)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9df086d6_d8c24033","line":70,"in_reply_to":"72843b9f_f207d3c0","updated":"2024-01-24 14:00:37.000000000","message":"Done","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        default\u003dNone,"},{"line_number":29,"context_line":"        help\u003d\"\"\""},{"line_number":30,"context_line":"A comma separated list of rfc3986 compatible URIs"},{"line_number":31,"context_line":"e.g. tcp://localhost:42424"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"syntax:"},{"line_number":34,"context_line":"    uri\u003d\u003cscheme\u003e://[host:port|path],\u003cscheme\u003e://[host:port|path]"}],"source_content_type":"text/x-python","patch_set":19,"id":"f84de1fa_f808c2db","line":31,"updated":"2024-02-09 16:23:46.000000000","message":"Are you using tcp here to distinguish it from unix? IMHO, this is confusing because it makes this seem like some bespoke layer 7 protocol when it\u0027s not. AFAIK, you\u0027re going to speak http regardless of the socket family, right? IMHO, scheme is http here, and the host determines whether we\u0027re using tcp, tcp6, or unix.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        default\u003dNone,"},{"line_number":29,"context_line":"        help\u003d\"\"\""},{"line_number":30,"context_line":"A comma separated list of rfc3986 compatible URIs"},{"line_number":31,"context_line":"e.g. tcp://localhost:42424"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"syntax:"},{"line_number":34,"context_line":"    uri\u003d\u003cscheme\u003e://[host:port|path],\u003cscheme\u003e://[host:port|path]"}],"source_content_type":"text/x-python","patch_set":19,"id":"25b6a95e_82e9f949","line":31,"in_reply_to":"1cf14601_fb37679b","updated":"2024-05-14 14:13:21.000000000","message":"Done","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":28,"context_line":"        default\u003dNone,"},{"line_number":29,"context_line":"        help\u003d\"\"\""},{"line_number":30,"context_line":"A comma separated list of rfc3986 compatible URIs"},{"line_number":31,"context_line":"e.g. tcp://localhost:42424"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"syntax:"},{"line_number":34,"context_line":"    uri\u003d\u003cscheme\u003e://[host:port|path],\u003cscheme\u003e://[host:port|path]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1cf14601_fb37679b","line":31,"in_reply_to":"f84de1fa_f808c2db","updated":"2024-02-13 10:14:35.000000000","message":"yes although orgianlly i was using tcp because it was going ot just be a raw socket but its really http now so ill change the prefix","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"}],"nova/healthcheck/manager.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b09b61fcd7bc8d1fa37f6c52d1abc8025c461c20","unresolved":true,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @property"},{"line_number":125,"context_line":"    def code(self) -\u003e str:"},{"line_number":126,"context_line":"        return \u0027200 OK\u0027 if self.passing else \"403 Service Unavailable\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def record("},{"line_number":129,"context_line":"            self, name: str, status: HealthcheckStatus, output: str \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"3447d69a_cc71096c","line":126,"range":{"start_line":126,"start_character":32,"end_line":126,"end_character":39},"updated":"2022-01-24 17:53:27.000000000","message":"this shoudl use failing\nas the respocne code for warnign is the same as passing.","commit_id":"7c69def000e335639be01240f710ae4d1915c545"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @property"},{"line_number":125,"context_line":"    def code(self) -\u003e str:"},{"line_number":126,"context_line":"        return \u0027200 OK\u0027 if self.passing else \"403 Service Unavailable\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def record("},{"line_number":129,"context_line":"            self, name: str, status: HealthcheckStatus, output: str \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"e6c22e22_9c07ee66","line":126,"range":{"start_line":126,"start_character":32,"end_line":126,"end_character":39},"in_reply_to":"3447d69a_cc71096c","updated":"2022-02-07 12:30:14.000000000","message":"Done","commit_id":"7c69def000e335639be01240f710ae4d1915c545"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":28,"context_line":"import nova.conf"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from nova import utils"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":"CACHE_CONTROL \u003d \u0027Cache-Control\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"b0a7b6d3_42ef2e06","line":31,"updated":"2022-02-07 09:41:39.000000000","message":"nit: there is more import grouping nova used to have.","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":false,"context_lines":[{"line_number":28,"context_line":"import nova.conf"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from nova import utils"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":"CACHE_CONTROL \u003d \u0027Cache-Control\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"f72bc11b_65471352","line":31,"in_reply_to":"b0a7b6d3_42ef2e06","updated":"2022-02-07 12:30:14.000000000","message":"Ack","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@dataclass(init\u003dFalse)"},{"line_number":67,"context_line":"class HealthcheckManager:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":70,"context_line":"    checks: ty.Dict[str, HealthcheckItem] \u003d field(default_factory\u003ddict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"b786eae6_1926da93","line":67,"range":{"start_line":67,"start_character":6,"end_line":67,"end_character":24},"updated":"2022-02-07 09:41:39.000000000","message":"this manager is probably not a dataclass. for example it has run method :)","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@dataclass(init\u003dFalse)"},{"line_number":67,"context_line":"class HealthcheckManager:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":70,"context_line":"    checks: ty.Dict[str, HealthcheckItem] \u003d field(default_factory\u003ddict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"b11a35c8_9b9fb136","line":67,"range":{"start_line":67,"start_character":6,"end_line":67,"end_character":24},"in_reply_to":"7401cc62_a2ee4e37","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":true,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@dataclass(init\u003dFalse)"},{"line_number":67,"context_line":"class HealthcheckManager:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":70,"context_line":"    checks: ty.Dict[str, HealthcheckItem] \u003d field(default_factory\u003ddict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7401cc62_a2ee4e37","line":67,"range":{"start_line":67,"start_character":6,"end_line":67,"end_character":24},"in_reply_to":"b786eae6_1926da93","updated":"2022-02-07 12:30:14.000000000","message":"if you have dataclass imply cstyle POD struct then i guess.\n\ni don\u0027t nessicaly expect that correlation to always hold but i agree with your point below we coudl likely seperate out the data form the business logic.","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":66,"context_line":"@dataclass(init\u003dFalse)"},{"line_number":67,"context_line":"class HealthcheckManager:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":70,"context_line":"    checks: ty.Dict[str, HealthcheckItem] \u003d field(default_factory\u003ddict)"},{"line_number":71,"context_line":"    ttl: ty.Optional[datetime.timedelta] \u003d None"},{"line_number":72,"context_line":"    gthread: eventlet.greenthread.GreenThread \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"81f54b6a_47461b55","line":69,"updated":"2022-02-07 09:41:39.000000000","message":"hm, this class probably can be split to a response class and a manager class.","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":false,"context_lines":[{"line_number":66,"context_line":"@dataclass(init\u003dFalse)"},{"line_number":67,"context_line":"class HealthcheckManager:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":70,"context_line":"    checks: ty.Dict[str, HealthcheckItem] \u003d field(default_factory\u003ddict)"},{"line_number":71,"context_line":"    ttl: ty.Optional[datetime.timedelta] \u003d None"},{"line_number":72,"context_line":"    gthread: eventlet.greenthread.GreenThread \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"51ac5f73_188f4887","line":69,"in_reply_to":"81f54b6a_47461b55","updated":"2022-02-07 12:30:14.000000000","message":"Ack","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ab81fbaea108069a8e1ca8303e9023b903267d1","unresolved":true,"context_lines":[{"line_number":131,"context_line":"        self.checks[name] \u003d HealthcheckItem("},{"line_number":132,"context_line":"            name\u003dname, status\u003dstatus, output\u003doutput)"},{"line_number":133,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":134,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[name]}\")"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def run(self, uris):"},{"line_number":137,"context_line":"        # TODO(sean-k-mooney): support multiple uris and unix sockets"}],"source_content_type":"text/x-python","patch_set":3,"id":"aaf4590a_3a0cef16","line":134,"updated":"2022-02-07 12:30:14.000000000","message":"this and to a lesser extent the debug line in expired are why i added teh debug config option.\n\nim a little affraid this might get noisy","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.checks[name] \u003d HealthcheckItem("},{"line_number":132,"context_line":"            name\u003dname, status\u003dstatus, output\u003doutput)"},{"line_number":133,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":134,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[name]}\")"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def run(self, uris):"},{"line_number":137,"context_line":"        # TODO(sean-k-mooney): support multiple uris and unix sockets"}],"source_content_type":"text/x-python","patch_set":3,"id":"addcd78e_51b6f3c0","line":134,"in_reply_to":"aaf4590a_3a0cef16","updated":"2022-02-16 00:11:00.000000000","message":"Ack","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":156,"context_line":"        endpoint \u003d (url.host, int(url.port))"},{"line_number":157,"context_line":"        socket \u003d eventlet.listen(endpoint)"},{"line_number":158,"context_line":"        LOG.info(f\"binding healthcheck endpoint {endpoint}\")"},{"line_number":159,"context_line":"        wsgi.server(socket, self.request_handeler)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def gen_body(self) -\u003e ty.List[str]:"},{"line_number":162,"context_line":"        # TODO(sean-k-mooney): populate full body"}],"source_content_type":"text/x-python","patch_set":3,"id":"dc845eb7_37223be9","line":159,"range":{"start_line":159,"start_character":33,"end_line":159,"end_character":49},"updated":"2022-02-07 09:41:39.000000000","message":"nit: request_handler","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        endpoint \u003d (url.host, int(url.port))"},{"line_number":157,"context_line":"        socket \u003d eventlet.listen(endpoint)"},{"line_number":158,"context_line":"        LOG.info(f\"binding healthcheck endpoint {endpoint}\")"},{"line_number":159,"context_line":"        wsgi.server(socket, self.request_handeler)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def gen_body(self) -\u003e ty.List[str]:"},{"line_number":162,"context_line":"        # TODO(sean-k-mooney): populate full body"}],"source_content_type":"text/x-python","patch_set":3,"id":"6b850bbf_abdd6e5a","line":159,"range":{"start_line":159,"start_character":33,"end_line":159,"end_character":49},"in_reply_to":"dc845eb7_37223be9","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8d88480c3d525f21a0dae96cde42bf584818d24e","unresolved":true,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        return [jsonutils.dumps(body)]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def request_handeler(self, env, start_responce):"},{"line_number":177,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":178,"context_line":"            start_responce(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":179,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"f7cfc597_c059c633","line":176,"range":{"start_line":176,"start_character":36,"end_line":176,"end_character":50},"updated":"2022-02-07 09:41:39.000000000","message":"nit: start_response","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3f627e011fd4653f94c3597fafc859dac1f397a5","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        return [jsonutils.dumps(body)]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def request_handeler(self, env, start_responce):"},{"line_number":177,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":178,"context_line":"            start_responce(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":179,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1e791c78_7c644185","line":176,"range":{"start_line":176,"start_character":36,"end_line":176,"end_character":50},"in_reply_to":"f7cfc597_c059c633","updated":"2022-02-16 00:11:00.000000000","message":"Done","commit_id":"50182aae4dedfe5f0b5e537323d9958679900acc"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"a2d0bda92a7bd6a6dcb4e0e61eaad51a39af0b4b","unresolved":true,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def expired(self, ttl: datetime.timedelta) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":4,"id":"06b642ea_42793835","line":56,"range":{"start_line":56,"start_character":30,"end_line":56,"end_character":35},"updated":"2022-04-15 15:13:08.000000000","message":"I wonder if we should exclude it from hashing and comparing, and consider two objects equal, if their health check item status extends over time unchanged?..","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def expired(self, ttl: datetime.timedelta) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":4,"id":"e8a0707b_f79eb8ee","line":56,"range":{"start_line":56,"start_character":30,"end_line":56,"end_character":35},"in_reply_to":"03cab331_d2e2d0f2","updated":"2023-10-05 18:55:55.000000000","message":"Ack","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"480d321e77a13a34ec9c30338ed4abd9d5097b50","unresolved":true,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def expired(self, ttl: datetime.timedelta) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":4,"id":"03cab331_d2e2d0f2","line":56,"range":{"start_line":56,"start_character":30,"end_line":56,"end_character":35},"in_reply_to":"06b642ea_42793835","updated":"2023-10-03 12:37:39.000000000","message":"i dont think so. we could but i dont think that gives us anythign useful for now.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def record("},{"line_number":86,"context_line":"            self, name: str, status: HealthcheckStatus, output: str \u003d None"},{"line_number":87,"context_line":"    ) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"c12dbb57_5a50ecdb","line":84,"updated":"2022-02-16 10:20:57.000000000","message":"passing and failing with their current definition does not cover the whole state space.\n\nIf checks \u003d [PASS(expired)] then passing -\u003e false and failing -\u003e false \n\nMaybe it is not a problem right now but it sames incomplete.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def record("},{"line_number":86,"context_line":"            self, name: str, status: HealthcheckStatus, output: str \u003d None"},{"line_number":87,"context_line":"    ) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"0897f159_7fe598f1","line":84,"in_reply_to":"9a6892ce_23659726","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"774547bea32cb26ccce5877738c6484063607106","unresolved":true,"context_lines":[{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def record("},{"line_number":86,"context_line":"            self, name: str, status: HealthcheckStatus, output: str \u003d None"},{"line_number":87,"context_line":"    ) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a6892ce_23659726","line":84,"in_reply_to":"c12dbb57_5a50ecdb","updated":"2022-02-22 17:58:08.000000000","message":"yes i have not implemted experation yet in general\ni was actully going to do that in a follow up patch but i can add it here too i guess.\n\nmy next poc item was going to be the devstack patch to deploy this then i was going to come back and work on these patches again.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class HealthcheckEndpoint:"},{"line_number":98,"context_line":"    uri: uri_reference \u003d None"},{"line_number":99,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":100,"context_line":"    service_id: str"},{"line_number":101,"context_line":"    description: str"},{"line_number":102,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__("},{"line_number":105,"context_line":"            self, url:str, tracker:HealthcheckTracker, service_uuid:str,"}],"source_content_type":"text/x-python","patch_set":4,"id":"8802bbf8_007a465f","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":58},"updated":"2022-02-16 10:20:57.000000000","message":"this seems strange for a non data class. I think __init__ is enough.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class HealthcheckEndpoint:"},{"line_number":98,"context_line":"    uri: uri_reference \u003d None"},{"line_number":99,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":100,"context_line":"    service_id: str"},{"line_number":101,"context_line":"    description: str"},{"line_number":102,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__("},{"line_number":105,"context_line":"            self, url:str, tracker:HealthcheckTracker, service_uuid:str,"}],"source_content_type":"text/x-python","patch_set":4,"id":"b949bde0_d791fb3e","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":58},"in_reply_to":"16b78df9_ba8799f7","updated":"2023-10-05 18:55:55.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"480d321e77a13a34ec9c30338ed4abd9d5097b50","unresolved":true,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class HealthcheckEndpoint:"},{"line_number":98,"context_line":"    uri: uri_reference \u003d None"},{"line_number":99,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":100,"context_line":"    service_id: str"},{"line_number":101,"context_line":"    description: str"},{"line_number":102,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__("},{"line_number":105,"context_line":"            self, url:str, tracker:HealthcheckTracker, service_uuid:str,"}],"source_content_type":"text/x-python","patch_set":4,"id":"16b78df9_ba8799f7","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":58},"in_reply_to":"1cc332a3_e5426154","updated":"2023-10-03 12:37:39.000000000","message":"technially i think yoru right but i think i did it this way at the time for a reason\n\nits been so long since i wrote this i cant remember but ill look at refactoring this again now that im working on this again.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"774547bea32cb26ccce5877738c6484063607106","unresolved":true,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class HealthcheckEndpoint:"},{"line_number":98,"context_line":"    uri: uri_reference \u003d None"},{"line_number":99,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":100,"context_line":"    service_id: str"},{"line_number":101,"context_line":"    description: str"},{"line_number":102,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__("},{"line_number":105,"context_line":"            self, url:str, tracker:HealthcheckTracker, service_uuid:str,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ede1fed7_d8ad8d65","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":58},"in_reply_to":"8802bbf8_007a465f","updated":"2022-02-22 17:58:08.000000000","message":"it is but it give mypi something to validate i guess i coudl set it to None however. i really just need to declare the type the default factory is not currently used so i can remvoe that.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3a9cfb7057d9bea799d2644d65a7b95bbb6ab336","unresolved":true,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"class HealthcheckEndpoint:"},{"line_number":98,"context_line":"    uri: uri_reference \u003d None"},{"line_number":99,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":100,"context_line":"    service_id: str"},{"line_number":101,"context_line":"    description: str"},{"line_number":102,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def __init__("},{"line_number":105,"context_line":"            self, url:str, tracker:HealthcheckTracker, service_uuid:str,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1cc332a3_e5426154","line":102,"range":{"start_line":98,"start_character":0,"end_line":102,"end_character":58},"in_reply_to":"ede1fed7_d8ad8d65","updated":"2022-02-23 13:17:54.000000000","message":"Hm, I assumed mypy can use the types from the __init__ arg list and spread that to the fields created in __init__","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":131,"context_line":"            LOG.error("},{"line_number":132,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":133,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":134,"context_line":"            return"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":137,"context_line":"        socket \u003d eventlet.listen(endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1cc49bd0_95280b48","line":134,"updated":"2022-02-16 10:20:57.000000000","message":"So if there are config errors then the healthcheck part of the service will not start. This probably will lead to error on the client side polling the healthcheck so it will be detected. I\u0027m OK with this. Another alternative would be to raise and stop the whole service to start if the healthcheck config is invalid.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"774547bea32cb26ccce5877738c6484063607106","unresolved":true,"context_lines":[{"line_number":131,"context_line":"            LOG.error("},{"line_number":132,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":133,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":134,"context_line":"            return"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":137,"context_line":"        socket \u003d eventlet.listen(endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"afc49b36_109931c7","line":134,"in_reply_to":"1cc49bd0_95280b48","updated":"2022-02-22 17:58:08.000000000","message":"ya i was not sure if we wanted to kill the service or now but i can just raise an InvalidHealtcheckEndpoint exception or simialr instead of returning.\n\nif that is prefer i can do that.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            LOG.error("},{"line_number":132,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":133,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":134,"context_line":"            return"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":137,"context_line":"        socket \u003d eventlet.listen(endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1d403042_a3db7dbf","line":134,"in_reply_to":"633e9e71_abb5fb68","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3a9cfb7057d9bea799d2644d65a7b95bbb6ab336","unresolved":true,"context_lines":[{"line_number":131,"context_line":"            LOG.error("},{"line_number":132,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":133,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":134,"context_line":"            return"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":137,"context_line":"        socket \u003d eventlet.listen(endpoint)"}],"source_content_type":"text/x-python","patch_set":4,"id":"633e9e71_abb5fb68","line":134,"in_reply_to":"afc49b36_109931c7","updated":"2022-02-23 13:17:54.000000000","message":"I\u0027m not sure. Both direction has some merits. Let\u0027s table this decision for later. I\u0027m OK with the current proposal.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        body \u003d {"},{"line_number":143,"context_line":"            \"status\": ("},{"line_number":144,"context_line":"                HealthcheckStatus.PASS if self.tracker.passing"},{"line_number":145,"context_line":"                else HealthcheckStatus.FAIL),"},{"line_number":146,"context_line":"            \"version\": HealthcheckManager.VERSION,"},{"line_number":147,"context_line":"            \"serviceId\": self.service_id,"},{"line_number":148,"context_line":"            \"description\": self.description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9cd0b363_dfa37359","line":145,"updated":"2022-02-16 10:20:57.000000000","message":"hm this could be inconsistent with the return code.\n\nIf checks \u003d [PASS(expired)] then tracker.passing -\u003e False so body.status -\u003e FAIL but tracker.failing -\u003e False too so code -\u003e 200 OK","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        body \u003d {"},{"line_number":143,"context_line":"            \"status\": ("},{"line_number":144,"context_line":"                HealthcheckStatus.PASS if self.tracker.passing"},{"line_number":145,"context_line":"                else HealthcheckStatus.FAIL),"},{"line_number":146,"context_line":"            \"version\": HealthcheckManager.VERSION,"},{"line_number":147,"context_line":"            \"serviceId\": self.service_id,"},{"line_number":148,"context_line":"            \"description\": self.description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"e33fd904_12de4378","line":145,"in_reply_to":"9cd0b363_dfa37359","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aa6a84a_ee36712a","line":157,"range":{"start_line":157,"start_character":23,"end_line":157,"end_character":29},"updated":"2022-02-16 10:20:57.000000000","message":"nit: however","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"}],"source_content_type":"text/x-python","patch_set":4,"id":"11c0d2f5_fadc4f86","line":157,"range":{"start_line":157,"start_character":34,"end_line":157,"end_character":37},"updated":"2022-02-16 10:20:57.000000000","message":"nit: now","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"}],"source_content_type":"text/x-python","patch_set":4,"id":"f21616a0_6c1ddd27","line":157,"range":{"start_line":157,"start_character":34,"end_line":157,"end_character":37},"in_reply_to":"11c0d2f5_fadc4f86","updated":"2023-08-01 06:18:22.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"37657f47128c37a0427176d694bf37e3efc96396","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"}],"source_content_type":"text/x-python","patch_set":4,"id":"64e5e593_6cbc7e8b","line":157,"range":{"start_line":157,"start_character":23,"end_line":157,"end_character":29},"in_reply_to":"5aa6a84a_ee36712a","updated":"2023-01-21 00:25:18.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":161,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a93e245_b9c82216","line":158,"range":{"start_line":158,"start_character":37,"end_line":158,"end_character":46},"updated":"2022-02-16 10:20:57.000000000","message":"nit: Reevaluate","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"37657f47128c37a0427176d694bf37e3efc96396","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    def request_handler(self, env, start_response) -\u003e None:"},{"line_number":156,"context_line":"        # NOTE(sean-k-mooney): in the future this endpoing may support"},{"line_number":157,"context_line":"        # other routes howver for not we only support /health so we hardcode"},{"line_number":158,"context_line":"        # a 404 for all other paths. Revaulate if we extend the endpoint."},{"line_number":159,"context_line":"        if env[\u0027PATH_INFO\u0027] !\u003d \u0027/health\u0027:"},{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":161,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"a1803fbb_5261cf99","line":158,"range":{"start_line":158,"start_character":37,"end_line":158,"end_character":46},"in_reply_to":"3a93e245_b9c82216","updated":"2023-01-21 00:25:18.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":161,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"},{"line_number":162,"context_line":"        headers \u003d [(\u0027Content-Type\u0027, \u0027application/health+json\u0027)]"},{"line_number":163,"context_line":"        if CONF.healthcheck.cache_control is None:"},{"line_number":164,"context_line":"            CONF.healthcheck.cache_control \u003d CONF.healthcheck.ttl"},{"line_number":165,"context_line":"            # this is guarded by the min value of ttl so just"},{"line_number":166,"context_line":"            # assert instead of check since we dont need to do this"},{"line_number":167,"context_line":"            # at runtime."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f099b41_b40a6e1f","line":164,"range":{"start_line":163,"start_character":7,"end_line":164,"end_character":65},"updated":"2022-02-16 10:20:57.000000000","message":"probably this logic can be moved out from the request handler to the __init__ to spare some cpu cycles. Or do you want to make it reconfigurable in runtime?","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"480d321e77a13a34ec9c30338ed4abd9d5097b50","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":161,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"},{"line_number":162,"context_line":"        headers \u003d [(\u0027Content-Type\u0027, \u0027application/health+json\u0027)]"},{"line_number":163,"context_line":"        if CONF.healthcheck.cache_control is None:"},{"line_number":164,"context_line":"            CONF.healthcheck.cache_control \u003d CONF.healthcheck.ttl"},{"line_number":165,"context_line":"            # this is guarded by the min value of ttl so just"},{"line_number":166,"context_line":"            # assert instead of check since we dont need to do this"},{"line_number":167,"context_line":"            # at runtime."}],"source_content_type":"text/x-python","patch_set":4,"id":"d3091291_13f1e18f","line":164,"range":{"start_line":163,"start_character":7,"end_line":164,"end_character":65},"in_reply_to":"3f099b41_b40a6e1f","updated":"2023-10-03 12:37:39.000000000","message":"no i dont think this need to be mutable at runtime.\ni could be but i would defer that out of scope for now.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            start_response(\u0027404 Not Found\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":161,"context_line":"            return [\u0027Not Found\\r\\n\u0027]"},{"line_number":162,"context_line":"        headers \u003d [(\u0027Content-Type\u0027, \u0027application/health+json\u0027)]"},{"line_number":163,"context_line":"        if CONF.healthcheck.cache_control is None:"},{"line_number":164,"context_line":"            CONF.healthcheck.cache_control \u003d CONF.healthcheck.ttl"},{"line_number":165,"context_line":"            # this is guarded by the min value of ttl so just"},{"line_number":166,"context_line":"            # assert instead of check since we dont need to do this"},{"line_number":167,"context_line":"            # at runtime."}],"source_content_type":"text/x-python","patch_set":4,"id":"ebc323a7_d27e1f29","line":164,"range":{"start_line":163,"start_character":7,"end_line":164,"end_character":65},"in_reply_to":"d3091291_13f1e18f","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":179,"context_line":"class HealthcheckManager:"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":182,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":183,"context_line":"    service_uuid: str"},{"line_number":184,"context_line":"    binary_name: str"},{"line_number":185,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":186,"context_line":"    endpoints: ty.List[HealthcheckEndpoint] \u003d field(default_factory\u003dlist)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def __init__(self, service_uuid, service_name, notes\u003dNone) -\u003e None:"},{"line_number":189,"context_line":"        super().__init__()"}],"source_content_type":"text/x-python","patch_set":4,"id":"046e5698_5e39c2bb","line":186,"range":{"start_line":182,"start_character":1,"end_line":186,"end_character":73},"updated":"2022-02-16 10:20:57.000000000","message":"ditto this seems unnecessary outside of a dataclass (this also make things defined on the class level that can have unexpected effects) the __init__ should be enough","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"480d321e77a13a34ec9c30338ed4abd9d5097b50","unresolved":false,"context_lines":[{"line_number":179,"context_line":"class HealthcheckManager:"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    VERSION \u003d \"1.0\""},{"line_number":182,"context_line":"    tracker: HealthcheckTracker \u003d None"},{"line_number":183,"context_line":"    service_uuid: str"},{"line_number":184,"context_line":"    binary_name: str"},{"line_number":185,"context_line":"    notes: ty.Dict[str, str] \u003d field(default_factory\u003ddict)"},{"line_number":186,"context_line":"    endpoints: ty.List[HealthcheckEndpoint] \u003d field(default_factory\u003dlist)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def __init__(self, service_uuid, service_name, notes\u003dNone) -\u003e None:"},{"line_number":189,"context_line":"        super().__init__()"}],"source_content_type":"text/x-python","patch_set":4,"id":"756a4a53_59f5ba0b","line":186,"range":{"start_line":182,"start_character":1,"end_line":186,"end_character":73},"in_reply_to":"046e5698_5e39c2bb","updated":"2023-10-03 12:37:39.000000000","message":"Ack","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":196,"context_line":"            notes \u003d {}"},{"line_number":197,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":198,"context_line":"        # notes is a dict of optional infomation that may be useful to"},{"line_number":199,"context_line":"        # the client of the healtcher. the \"host\" key will always be present."},{"line_number":200,"context_line":"        # other values such as \"hypervisor_hostname\" will only be populated"},{"line_number":201,"context_line":"        # for the compute agent binary."},{"line_number":202,"context_line":"        self.notes \u003d notes"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fa06189_0ff6bef3","line":199,"range":{"start_line":199,"start_character":28,"end_line":199,"end_character":37},"updated":"2022-02-16 10:20:57.000000000","message":"nit:healthcheck","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"37657f47128c37a0427176d694bf37e3efc96396","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            notes \u003d {}"},{"line_number":197,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":198,"context_line":"        # notes is a dict of optional infomation that may be useful to"},{"line_number":199,"context_line":"        # the client of the healtcher. the \"host\" key will always be present."},{"line_number":200,"context_line":"        # other values such as \"hypervisor_hostname\" will only be populated"},{"line_number":201,"context_line":"        # for the compute agent binary."},{"line_number":202,"context_line":"        self.notes \u003d notes"}],"source_content_type":"text/x-python","patch_set":4,"id":"d8022029_f2d36def","line":199,"range":{"start_line":199,"start_character":28,"end_line":199,"end_character":37},"in_reply_to":"9fa06189_0ff6bef3","updated":"2023-01-21 00:25:18.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":199,"context_line":"        # the client of the healtcher. the \"host\" key will always be present."},{"line_number":200,"context_line":"        # other values such as \"hypervisor_hostname\" will only be populated"},{"line_number":201,"context_line":"        # for the compute agent binary."},{"line_number":202,"context_line":"        self.notes \u003d notes"},{"line_number":203,"context_line":"        self.endpoints \u003d []"},{"line_number":204,"context_line":"        if CONF.healthcheck.uri is not None:"},{"line_number":205,"context_line":"            urls \u003d CONF.healthcheck.uri.split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"2954456a_d7e9c655","line":202,"updated":"2022-02-16 10:20:57.000000000","message":"Is it more like metadata? Or even service_info? (just bikeshedding)","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        # the client of the healtcher. the \"host\" key will always be present."},{"line_number":200,"context_line":"        # other values such as \"hypervisor_hostname\" will only be populated"},{"line_number":201,"context_line":"        # for the compute agent binary."},{"line_number":202,"context_line":"        self.notes \u003d notes"},{"line_number":203,"context_line":"        self.endpoints \u003d []"},{"line_number":204,"context_line":"        if CONF.healthcheck.uri is not None:"},{"line_number":205,"context_line":"            urls \u003d CONF.healthcheck.uri.split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"044bb0ec_893040d0","line":202,"in_reply_to":"1aa78246_b1c8f57e","updated":"2023-10-05 18:55:55.000000000","message":"Ack","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"774547bea32cb26ccce5877738c6484063607106","unresolved":true,"context_lines":[{"line_number":199,"context_line":"        # the client of the healtcher. the \"host\" key will always be present."},{"line_number":200,"context_line":"        # other values such as \"hypervisor_hostname\" will only be populated"},{"line_number":201,"context_line":"        # for the compute agent binary."},{"line_number":202,"context_line":"        self.notes \u003d notes"},{"line_number":203,"context_line":"        self.endpoints \u003d []"},{"line_number":204,"context_line":"        if CONF.healthcheck.uri is not None:"},{"line_number":205,"context_line":"            urls \u003d CONF.healthcheck.uri.split(\u0027,\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78246_b1c8f57e","line":202,"in_reply_to":"2954456a_d7e9c655","updated":"2022-02-22 17:58:08.000000000","message":"yes the notes filed is just meatadata about the endpoint.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                )"},{"line_number":212,"context_line":"                self.endpoints.append(endpoint)"},{"line_number":213,"context_line":"                LOG.info(f\u0027Spawing healthcheck endpoint: {url}\u0027)"},{"line_number":214,"context_line":"                utils.spawn_n(endpoint.run)"},{"line_number":215,"context_line":"            # technically this is not needed but by yielding here we"},{"line_number":216,"context_line":"            # increase the likelihood that the spawn above will happen"},{"line_number":217,"context_line":"            # before we return from the initializer which can be nice when"}],"source_content_type":"text/x-python","patch_set":4,"id":"326c7c04_95373aa3","line":214,"range":{"start_line":214,"start_character":16,"end_line":214,"end_character":43},"updated":"2022-02-16 10:20:57.000000000","message":"Is there a reason to use spawn_n instead of spawn? We learned that spawn_n does not use GreenThread from eventlet but use naked greenlets. Both works but if there is no specific reason (i.e. performance loss due to the GreenThread wrapper) then I suggest to use the eventlet way as that gives us a better troubleshoot-ability. See the long long discussion in https://review.opendev.org/c/openstack/nova/+/813114 about the internals of eventlet.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"774547bea32cb26ccce5877738c6484063607106","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                )"},{"line_number":212,"context_line":"                self.endpoints.append(endpoint)"},{"line_number":213,"context_line":"                LOG.info(f\u0027Spawing healthcheck endpoint: {url}\u0027)"},{"line_number":214,"context_line":"                utils.spawn_n(endpoint.run)"},{"line_number":215,"context_line":"            # technically this is not needed but by yielding here we"},{"line_number":216,"context_line":"            # increase the likelihood that the spawn above will happen"},{"line_number":217,"context_line":"            # before we return from the initializer which can be nice when"}],"source_content_type":"text/x-python","patch_set":4,"id":"6d4eec3d_abc6e20e","line":214,"range":{"start_line":214,"start_character":16,"end_line":214,"end_character":43},"in_reply_to":"326c7c04_95373aa3","updated":"2022-02-22 17:58:08.000000000","message":"oh i just did not need a return value so i used spawn_n\nthat was the only reason i can use spawn and just not store what it returns.\n\ni was not aware spwan vs spanw_n had any other side effect.\nif we think its useful to store the reference to the grean thread i could also do that in the endpoint but i did not have a reason for keeping a handel to it so i used spawn_n to reflect that.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"37657f47128c37a0427176d694bf37e3efc96396","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                )"},{"line_number":212,"context_line":"                self.endpoints.append(endpoint)"},{"line_number":213,"context_line":"                LOG.info(f\u0027Spawing healthcheck endpoint: {url}\u0027)"},{"line_number":214,"context_line":"                utils.spawn_n(endpoint.run)"},{"line_number":215,"context_line":"            # technically this is not needed but by yielding here we"},{"line_number":216,"context_line":"            # increase the likelihood that the spawn above will happen"},{"line_number":217,"context_line":"            # before we return from the initializer which can be nice when"}],"source_content_type":"text/x-python","patch_set":4,"id":"f4abd0cf_09daa64e","line":214,"range":{"start_line":214,"start_character":16,"end_line":214,"end_character":43},"in_reply_to":"58a7eef1_8e990f43","updated":"2023-01-21 00:25:18.000000000","message":"Done","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3a9cfb7057d9bea799d2644d65a7b95bbb6ab336","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                )"},{"line_number":212,"context_line":"                self.endpoints.append(endpoint)"},{"line_number":213,"context_line":"                LOG.info(f\u0027Spawing healthcheck endpoint: {url}\u0027)"},{"line_number":214,"context_line":"                utils.spawn_n(endpoint.run)"},{"line_number":215,"context_line":"            # technically this is not needed but by yielding here we"},{"line_number":216,"context_line":"            # increase the likelihood that the spawn above will happen"},{"line_number":217,"context_line":"            # before we return from the initializer which can be nice when"}],"source_content_type":"text/x-python","patch_set":4,"id":"58a7eef1_8e990f43","line":214,"range":{"start_line":214,"start_character":16,"end_line":214,"end_character":43},"in_reply_to":"6d4eec3d_abc6e20e","updated":"2022-02-23 13:17:54.000000000","message":"You can switch to spawn without storing the handle. And I suggest to do so as if we ever need to debug the eventlet part of the healthcheck handling then having a GreenThread python wrapper around the greenlet C extension magic helps.","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11516879530bd217e43962c874c4723b08014242","unresolved":true,"context_lines":[{"line_number":218,"context_line":"            # manually debugging/executing this module in an interactive shell."},{"line_number":219,"context_line":"            self.sleep()"},{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            LOG.info(\u0027healthcheck endpoint is not enabled\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def sleep(self, time: int \u003d 0) -\u003e None:"},{"line_number":224,"context_line":"        # NOTE(sean-k-mooney): when running this module in an interactive"}],"source_content_type":"text/x-python","patch_set":4,"id":"18482103_03830163","line":221,"updated":"2022-02-16 10:20:57.000000000","message":"+1","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            # manually debugging/executing this module in an interactive shell."},{"line_number":219,"context_line":"            self.sleep()"},{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            LOG.info(\u0027healthcheck endpoint is not enabled\u0027)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def sleep(self, time: int \u003d 0) -\u003e None:"},{"line_number":224,"context_line":"        # NOTE(sean-k-mooney): when running this module in an interactive"}],"source_content_type":"text/x-python","patch_set":4,"id":"da60a4a9_dbe46a75","line":221,"in_reply_to":"18482103_03830163","updated":"2023-10-05 18:55:55.000000000","message":"Ack","commit_id":"8be512638de21babe415ac63fc56c064c4fd18d4"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"f436ade121a220f28680e5684477932e2a50b293","unresolved":true,"context_lines":[{"line_number":52,"context_line":"    \"\"\"A class to model a healthcheck result\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3e48a696_9f313aa3","line":55,"updated":"2023-05-19 13:47:09.000000000","message":"here when default status is set to \u0027unknown\u0027, then how come on curl, its returning status as \u0027pass\u0027","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\"A class to model a healthcheck result\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"59eb8f42_3ceec4a3","line":55,"in_reply_to":"063e825d_80590aeb","updated":"2023-08-01 06:18:22.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"6d24784bdfdb80bab882a809df7939fabd068c4c","unresolved":true,"context_lines":[{"line_number":52,"context_line":"    \"\"\"A class to model a healthcheck result\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa075a1f_57abe8bd","line":55,"in_reply_to":"3e48a696_9f313aa3","updated":"2023-05-19 13:50:09.000000000","message":"because right now at line 75, at passing \npass if HealthcheckStatus.PASS or HealthcheckStatus.UNKNOWN\n\nI think later it will be changed.","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e3056c9f527f810af8aea1d1bb13a4347ea207b3","unresolved":true,"context_lines":[{"line_number":52,"context_line":"    \"\"\"A class to model a healthcheck result\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    name: str  # required value"},{"line_number":55,"context_line":"    status: HealthcheckStatus \u003d HealthcheckStatus.UNKNOWN"},{"line_number":56,"context_line":"    time: datetime.datetime \u003d field(default_factory\u003dtimeutils.utcnow)"},{"line_number":57,"context_line":"    output: ty.Optional[str] \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"063e825d_80590aeb","line":55,"in_reply_to":"fa075a1f_57abe8bd","updated":"2023-05-22 09:43:13.000000000","message":"we do not consider the unknown state as an error so yes on line 75 we treat unkown as passing.","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"f436ade121a220f28680e5684477932e2a50b293","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                HealthcheckStatus.PASS or HealthcheckStatus.UNKNOWN"},{"line_number":75,"context_line":"            ) and not check.expired(self.ttl)"},{"line_number":76,"context_line":"            for check in self.checks"},{"line_number":77,"context_line":"        )"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":5,"id":"b594bb11_c4a9df16","line":77,"updated":"2023-05-19 13:47:09.000000000","message":"note to self\n```\nIn [206]: t2.record(\u0027nova\u0027, HealthcheckStatus(\u0027unknown\u0027))\n\nIn [207]: t2\nOut[207]: HealthcheckTracker(checks\u003d{\u0027nova\u0027: HealthcheckItem(name\u003d\u0027nova\u0027, status\u003d\u003cHealthcheckStatus.UNKNOWN: \u0027unknown\u0027\u003e, time\u003ddatetime.datetime(2023, 5, 19, 12, 57, 7, 553281), output\u003dNone)}, ttl\u003dNone)\n\nIn [209]: t2.passing\n----\u003e 9         check.status in (\n\nAttributeError: \u0027str\u0027 object has no attribute \u0027status\u0027\n\nIn [212]: t2.checks[\u0027nova\u0027]\nOut[212]: HealthcheckItem(name\u003d\u0027nova\u0027, status\u003d\u003cHealthcheckStatus.UNKNOWN: \u0027unknown\u0027\u003e, time\u003ddatetime.datetime(2023, 5, 19, 12, 57, 7, 553281), output\u003dNone)\n\n\nIn [213]: t2.checks[\u0027nova\u0027].status\nOut[213]: \u003cHealthcheckStatus.UNKNOWN: \u0027unknown\u0027\u003e\n```","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                HealthcheckStatus.PASS or HealthcheckStatus.UNKNOWN"},{"line_number":75,"context_line":"            ) and not check.expired(self.ttl)"},{"line_number":76,"context_line":"            for check in self.checks"},{"line_number":77,"context_line":"        )"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":5,"id":"49da4c77_ed127f8d","line":77,"in_reply_to":"6edd9956_abc42133","updated":"2023-10-13 09:10:00.000000000","message":"Done","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                HealthcheckStatus.PASS or HealthcheckStatus.UNKNOWN"},{"line_number":75,"context_line":"            ) and not check.expired(self.ttl)"},{"line_number":76,"context_line":"            for check in self.checks"},{"line_number":77,"context_line":"        )"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":5,"id":"6edd9956_abc42133","line":77,"in_reply_to":"b594bb11_c4a9df16","updated":"2023-08-01 06:18:22.000000000","message":"@Sean it was failing for me, so updated.\nis this alright ?","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"f436ade121a220f28680e5684477932e2a50b293","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"},{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"6ebb9bb7_54c5de3d","line":81,"updated":"2023-05-19 13:47:09.000000000","message":"I understand, if even any one nova-service is not running say nova is failing.\n\ncan we also return which nova-service it is.\n\nreturn check.name(s)\n\nlater with some journalctl logs, like systemd","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"},{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"b643f3e2_d0eba1a8","line":81,"in_reply_to":"1019370f_88099c63","updated":"2023-10-05 18:55:55.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e3056c9f527f810af8aea1d1bb13a4347ea207b3","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"},{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad255f4_3b827254","line":81,"in_reply_to":"6ebb9bb7_54c5de3d","updated":"2023-05-22 09:43:13.000000000","message":"you miss understand how this works.\n\n\neach openstack service has its own instance of this health check endpoint\n\nso each nova-comptue agent will have there own tcp endpoint\nthe apis, schdulers, conductors all have ther own endpoitn that reprots the health checks for that one service.\n\n\nthe name of the service is recorded in the description of the healtcheck endpoint not in the healthcheck.","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def failing(self) -\u003e bool:"},{"line_number":81,"context_line":"        return any("},{"line_number":82,"context_line":"            check.status \u003d\u003d HealthcheckStatus.FAIL for check in self.checks"},{"line_number":83,"context_line":"        )"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1019370f_88099c63","line":81,"in_reply_to":"7ad255f4_3b827254","updated":"2023-08-01 06:18:22.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e3056c9f527f810af8aea1d1bb13a4347ea207b3","unresolved":true,"context_lines":[{"line_number":108,"context_line":"        self.uri \u003d uri_reference(url).normalize()"},{"line_number":109,"context_line":"        self.tracker \u003d tracker"},{"line_number":110,"context_line":"        self.service_id \u003d service_uuid"},{"line_number":111,"context_line":"        self.description \u003d binary_name"},{"line_number":112,"context_line":"        self.notes \u003d notes"},{"line_number":113,"context_line":"        assert self.uri.is_valid()"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"2a6a8af4_8e831b4f","line":111,"updated":"2023-05-22 09:43:13.000000000","message":"@amit this is where the service type ( nova-compute) is stored in the description and its uuid is recorded in the service_id","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        self.uri \u003d uri_reference(url).normalize()"},{"line_number":109,"context_line":"        self.tracker \u003d tracker"},{"line_number":110,"context_line":"        self.service_id \u003d service_uuid"},{"line_number":111,"context_line":"        self.description \u003d binary_name"},{"line_number":112,"context_line":"        self.notes \u003d notes"},{"line_number":113,"context_line":"        assert self.uri.is_valid()"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"270dc138_7979cc4f","line":111,"in_reply_to":"2a6a8af4_8e831b4f","updated":"2023-08-01 06:18:22.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e3056c9f527f810af8aea1d1bb13a4347ea207b3","unresolved":true,"context_lines":[{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        if notes is None:"},{"line_number":197,"context_line":"            notes \u003d {}"},{"line_number":198,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":199,"context_line":"        # notes is a dict of optional information that may be useful to"},{"line_number":200,"context_line":"        # the client of the healthchecker. The \"host\" key will always be"},{"line_number":201,"context_line":"        # present. Other values such as \"hypervisor_hostname\" will only be"}],"source_content_type":"text/x-python","patch_set":5,"id":"cc8ba81d_fac6ac87","line":198,"updated":"2023-05-22 09:43:13.000000000","message":"@amit you can also see we store the hostname form Conf.host in the notes filed\n\nthe notes filed is a set of addtional metadata\n\nso each health check endpoint has the service type , its uuid and the hostname provided.\n\nso we do not want any of this info to be in the checks\n\nwe will never have more then one service for a given proccess so we do not require more then one heatlcheck either.","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        if notes is None:"},{"line_number":197,"context_line":"            notes \u003d {}"},{"line_number":198,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":199,"context_line":"        # notes is a dict of optional information that may be useful to"},{"line_number":200,"context_line":"        # the client of the healthchecker. The \"host\" key will always be"},{"line_number":201,"context_line":"        # present. Other values such as \"hypervisor_hostname\" will only be"}],"source_content_type":"text/x-python","patch_set":5,"id":"fe526c56_8d512092","line":198,"in_reply_to":"88299262_35ab4b89","updated":"2023-08-01 06:18:22.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5d4941533c24e9d0fc9efb1c00040c76fe1db7f3","unresolved":true,"context_lines":[{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        if notes is None:"},{"line_number":197,"context_line":"            notes \u003d {}"},{"line_number":198,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":199,"context_line":"        # notes is a dict of optional information that may be useful to"},{"line_number":200,"context_line":"        # the client of the healthchecker. The \"host\" key will always be"},{"line_number":201,"context_line":"        # present. Other values such as \"hypervisor_hostname\" will only be"}],"source_content_type":"text/x-python","patch_set":5,"id":"88299262_35ab4b89","line":198,"in_reply_to":"cc8ba81d_fac6ac87","updated":"2023-05-22 09:43:36.000000000","message":"healthcheck endpoint","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"286f9bd6c8f3bd761e3be68e85a4dea9c7183479","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        if notes is None:"},{"line_number":197,"context_line":"            notes \u003d {}"},{"line_number":198,"context_line":"        notes[\u0027host\u0027] \u003d CONF.host"},{"line_number":199,"context_line":"        # notes is a dict of optional information that may be useful to"},{"line_number":200,"context_line":"        # the client of the healthchecker. The \"host\" key will always be"},{"line_number":201,"context_line":"        # present. Other values such as \"hypervisor_hostname\" will only be"}],"source_content_type":"text/x-python","patch_set":5,"id":"64d22a41_025d0a6a","line":198,"in_reply_to":"fe526c56_8d512092","updated":"2023-10-05 18:55:55.000000000","message":"Ack","commit_id":"bde1e23a596e4b8cb12c91460e84747211303b38"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":true,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def expired(self, ttl: ty.Optional[datetime.timedelta] \u003d None) -\u003e bool:"},{"line_number":93,"context_line":"        if ttl is None:"},{"line_number":94,"context_line":"            return False"},{"line_number":95,"context_line":"        result \u003d self.time \u003c timeutils.utcnow() - ttl"},{"line_number":96,"context_line":"        if result and CONF.healthcheck.debug:"},{"line_number":97,"context_line":"            LOG.debug(f\u0027Healthcheck: {self} expired\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"f2e34342_3aad39b1","line":94,"updated":"2023-10-13 09:10:00.000000000","message":"+1","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def expired(self, ttl: ty.Optional[datetime.timedelta] \u003d None) -\u003e bool:"},{"line_number":93,"context_line":"        if ttl is None:"},{"line_number":94,"context_line":"            return False"},{"line_number":95,"context_line":"        result \u003d self.time \u003c timeutils.utcnow() - ttl"},{"line_number":96,"context_line":"        if result and CONF.healthcheck.debug:"},{"line_number":97,"context_line":"            LOG.debug(f\u0027Healthcheck: {self} expired\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"450745d5_334bfe05","line":94,"in_reply_to":"f2e34342_3aad39b1","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"f3d4e082535ddcea705de441b475aca572fcea15","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # TODO(sean-k-mooney): should we wrap expire_checks,"},{"line_number":177,"context_line":"    # reset and record in a lock?"},{"line_number":178,"context_line":"    def expire_checks(self) -\u003e None:"},{"line_number":179,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3970fbe6_2bb32f32","line":177,"updated":"2023-10-11 11:21:42.000000000","message":"I have previvousely noted elsewhere [0] \"(for) monkey patched eventlet greenthreads, choose threadinglock and multi-threads-safe standard dictionary\". If that helps...\n\n[0] https://review.opendev.org/c/openstack/tripleo-common/+/687288","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5f6b280f04843bc7713a199817626d4aacc88a66","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # TODO(sean-k-mooney): should we wrap expire_checks,"},{"line_number":177,"context_line":"    # reset and record in a lock?"},{"line_number":178,"context_line":"    def expire_checks(self) -\u003e None:"},{"line_number":179,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fcf2a4ee_e41fac06","line":177,"in_reply_to":"3970fbe6_2bb32f32","updated":"2023-10-13 10:24:54.000000000","message":"we have a synconised decorator which uses oslo synconisation in nova when we need locking. the triplo approch si not one i woudl like to emulate.\n\nthe reason this is a question is not about how to do this it seven if ti matters\n\nin this case unsinconised write are totally ok in general. the only time this is not ok is if we are iterating over a collection and it is modifed during that iteration.\n\ni will likely add a lock for extra safty in that case but it not really critical its  just more correct.","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"03454a9fb8a76c01783a6b7f08e7931b59f0d0c4","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # TODO(sean-k-mooney): should we wrap expire_checks,"},{"line_number":177,"context_line":"    # reset and record in a lock?"},{"line_number":178,"context_line":"    def expire_checks(self) -\u003e None:"},{"line_number":179,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"24d30f05_7a4b1a15","line":177,"in_reply_to":"fcf2a4ee_e41fac06","updated":"2024-01-24 14:00:37.000000000","message":"Acknowledged","commit_id":"ae50cbab83a1d62f47dd2feb53511096c1b62060"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":17,"context_line":"from enum import Enum"},{"line_number":18,"context_line":"from enum import EnumMeta"},{"line_number":19,"context_line":"from functools import singledispatchmethod"},{"line_number":20,"context_line":"from typing import Any"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import eventlet"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"4ebdd04b_a250a5eb","line":20,"updated":"2024-02-09 16:23:46.000000000","message":"Please import modules, not objects, per the openstack style guide:\n\nhttps://docs.openstack.org/hacking/latest/user/hacking.html#imports\n\nAFAIK, we\u0027re pretty tight with this in nova with the exception of SQLa stuff which has always been weird. But it makes reconciling a lot of the use of these things much harder below.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":17,"context_line":"from enum import Enum"},{"line_number":18,"context_line":"from enum import EnumMeta"},{"line_number":19,"context_line":"from functools import singledispatchmethod"},{"line_number":20,"context_line":"from typing import Any"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import eventlet"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7c973bf7_ccff35e3","line":20,"in_reply_to":"4ebdd04b_a250a5eb","updated":"2024-02-13 10:14:35.000000000","message":"ya i generall do that im not sure why i ededn up not doing that here for this\n\ni suspect that was partly because of the documentiaon i was reading ectra was doing this.\n\noverall i prefer the styple of only importing modules.\nit makes things simpler to reason about","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from enum import Enum"},{"line_number":18,"context_line":"from enum import EnumMeta"},{"line_number":19,"context_line":"from functools import singledispatchmethod"},{"line_number":20,"context_line":"from typing import Any"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import eventlet"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"52c5d8fe_acc9b6c9","line":20,"in_reply_to":"7c973bf7_ccff35e3","updated":"2024-05-14 14:13:21.000000000","message":"Done","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"434199eb4006b8f98f1b00b3251996e513f40284","unresolved":true,"context_lines":[{"line_number":40,"context_line":"NO_CACHE \u003d \u0027no-cache\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# ported form https://stackoverflow.com/a/54278817"},{"line_number":43,"context_line":"# this is kind of overkill but it will prevent incorrect modification"},{"line_number":44,"context_line":"# of the enum class at runtime such as in tests."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"e1eb3ea4_0862b96d","line":43,"updated":"2024-02-09 09:43:44.000000000","message":"yes, I think it is :)","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":40,"context_line":"NO_CACHE \u003d \u0027no-cache\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# ported form https://stackoverflow.com/a/54278817"},{"line_number":43,"context_line":"# this is kind of overkill but it will prevent incorrect modification"},{"line_number":44,"context_line":"# of the enum class at runtime such as in tests."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"48c67075_91ed662a","line":43,"in_reply_to":"45038544_31d66c77","updated":"2024-02-13 10:14:35.000000000","message":"ya i really just wanted to prevent you form asigining values outside of the valid enum range to the enum.\n\nthis is the belt an bracess approch to doing this genericly for any enum.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"11685fd19716f49c27717756600ea4afcc5035a4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"NO_CACHE \u003d \u0027no-cache\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# ported form https://stackoverflow.com/a/54278817"},{"line_number":43,"context_line":"# this is kind of overkill but it will prevent incorrect modification"},{"line_number":44,"context_line":"# of the enum class at runtime such as in tests."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a2e4cd9_a8e26ab9","line":43,"in_reply_to":"48c67075_91ed662a","updated":"2024-08-26 16:41:17.000000000","message":"Acknowledged","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":40,"context_line":"NO_CACHE \u003d \u0027no-cache\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# ported form https://stackoverflow.com/a/54278817"},{"line_number":43,"context_line":"# this is kind of overkill but it will prevent incorrect modification"},{"line_number":44,"context_line":"# of the enum class at runtime such as in tests."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"45038544_31d66c77","line":43,"in_reply_to":"e1eb3ea4_0862b96d","updated":"2024-02-09 16:23:46.000000000","message":"Yeah, I mean, a lot of this seems a bit over-engineered to me. Not saying it\u0027s not nice and tight, but it does seem to make it harder to grok than it needs to be for something so simple.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"434199eb4006b8f98f1b00b3251996e513f40284","unresolved":true,"context_lines":[{"line_number":97,"context_line":"            LOG.debug(f\u0027Healthcheck: {self} expired\u0027)"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # needed to support jsonutils.dumps since this is a complex type"},{"line_number":101,"context_line":"    def iteritems(self) -\u003e ty.Iterator[ty.Tuple[str, Any]]:"},{"line_number":102,"context_line":"        yield \u0027name\u0027, self.name"},{"line_number":103,"context_line":"        yield \u0027status\u0027, self.status"}],"source_content_type":"text/x-python","patch_set":19,"id":"5501bfc6_dbf71682","line":100,"updated":"2024-02-09 09:43:44.000000000","message":"Is it complex due to the datetime field?","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":97,"context_line":"            LOG.debug(f\u0027Healthcheck: {self} expired\u0027)"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # needed to support jsonutils.dumps since this is a complex type"},{"line_number":101,"context_line":"    def iteritems(self) -\u003e ty.Iterator[ty.Tuple[str, Any]]:"},{"line_number":102,"context_line":"        yield \u0027name\u0027, self.name"},{"line_number":103,"context_line":"        yield \u0027status\u0027, self.status"}],"source_content_type":"text/x-python","patch_set":19,"id":"e92e6c30_1e0bf588","line":100,"in_reply_to":"5501bfc6_dbf71682","updated":"2024-02-13 10:14:35.000000000","message":"yep the datetime field is the main reason for this.\n\neverything else is a string since HealthcheckStatus is a string \nHealthcheckStatus(str, Enum)","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            LOG.debug(f\u0027Healthcheck: {self} expired\u0027)"},{"line_number":98,"context_line":"        return result"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # needed to support jsonutils.dumps since this is a complex type"},{"line_number":101,"context_line":"    def iteritems(self) -\u003e ty.Iterator[ty.Tuple[str, Any]]:"},{"line_number":102,"context_line":"        yield \u0027name\u0027, self.name"},{"line_number":103,"context_line":"        yield \u0027status\u0027, self.status"}],"source_content_type":"text/x-python","patch_set":19,"id":"aa95b6ab_06965649","line":100,"in_reply_to":"e92e6c30_1e0bf588","updated":"2024-05-14 14:13:21.000000000","message":"added this to the note","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"6c018a0c_35b3ab09","line":148,"updated":"2024-02-09 16:23:46.000000000","message":"Farewell Python, I hardly knew ye.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"11685fd19716f49c27717756600ea4afcc5035a4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"34f7b28a_f1200e94","line":148,"in_reply_to":"6c018a0c_35b3ab09","updated":"2024-08-26 16:41:17.000000000","message":"Acknowledged","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"a8313cb8_0e75752f","line":164,"updated":"2024-02-09 16:23:46.000000000","message":"This is impressively hard to read due to the style(?). Why the blank first line? I know this is the style in the examples, but for the sake of the humans, can we give these names, even if it doesn\u0027t actually matter?\n\nThe HealthCheckItem statement can be one line?","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"c746180a_6c477c96","line":164,"in_reply_to":"a8313cb8_0e75752f","updated":"2024-02-13 10:14:35.000000000","message":"sure we can give these names.\ni normally move all arge to a new line if i need to wrap them to get back the indetaion from the function name but ya looking at this agin this looks weird to me too. i can fix this up.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"}],"source_content_type":"text/x-python","patch_set":19,"id":"eeed12b7_6aa73fdf","line":164,"in_reply_to":"c746180a_6c477c96","updated":"2024-05-14 14:13:21.000000000","message":"Done","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"434199eb4006b8f98f1b00b3251996e513f40284","unresolved":true,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # this should never be called but we need to define it"},{"line_number":153,"context_line":"        # to enable the use of the @singledispatchmethod decorator."},{"line_number":154,"context_line":"        raise NotImplementedError()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @record.register"},{"line_number":157,"context_line":"    def _("},{"line_number":158,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":159,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":160,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"},{"line_number":168,"context_line":"        \"\"\"Record a HealthcheckItem\"\"\""},{"line_number":169,"context_line":"        self.checks[item.name] \u003d item"},{"line_number":170,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":171,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[item.name]}\")"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"b8d7b144_aab91b11","line":172,"range":{"start_line":148,"start_character":0,"end_line":172,"end_character":0},"updated":"2024-02-09 09:43:44.000000000","message":"Why do we need both ways to record a healthcheck? This is a lot of complication compared to let the caller always create a HealthcheckItem and pass it in.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # this should never be called but we need to define it"},{"line_number":153,"context_line":"        # to enable the use of the @singledispatchmethod decorator."},{"line_number":154,"context_line":"        raise NotImplementedError()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @record.register"},{"line_number":157,"context_line":"    def _("},{"line_number":158,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":159,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":160,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"},{"line_number":168,"context_line":"        \"\"\"Record a HealthcheckItem\"\"\""},{"line_number":169,"context_line":"        self.checks[item.name] \u003d item"},{"line_number":170,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":171,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[item.name]}\")"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ab40f4b7_9969785a","line":172,"range":{"start_line":148,"start_character":0,"end_line":172,"end_character":0},"in_reply_to":"32b15c1f_43bcb945","updated":"2024-02-13 10:14:35.000000000","message":"i wrote it one way and then found may self wanting to use it the other\nbut instead of entrily removing the first way i decied to make it work with both.\n\nin general just provide the helthcheck item works but i found my self doing the opisite i thikn more offten.\n\nbasiclly why i found my self wanting to recored a value directly like this\nhttps://review.opendev.org/c/openstack/nova/+/907424/1/nova/virt/libvirt/driver.py#5311\n\ni tended to want to import one less module and default to the inline form instead of passsing a full object","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"11685fd19716f49c27717756600ea4afcc5035a4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # this should never be called but we need to define it"},{"line_number":153,"context_line":"        # to enable the use of the @singledispatchmethod decorator."},{"line_number":154,"context_line":"        raise NotImplementedError()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @record.register"},{"line_number":157,"context_line":"    def _("},{"line_number":158,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":159,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":160,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"},{"line_number":168,"context_line":"        \"\"\"Record a HealthcheckItem\"\"\""},{"line_number":169,"context_line":"        self.checks[item.name] \u003d item"},{"line_number":170,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":171,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[item.name]}\")"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"10f90112_7a5a497a","line":172,"range":{"start_line":148,"start_character":0,"end_line":172,"end_character":0},"in_reply_to":"ab40f4b7_9969785a","updated":"2024-08-26 16:41:17.000000000","message":"Acknowledged","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # this should never be called but we need to define it"},{"line_number":153,"context_line":"        # to enable the use of the @singledispatchmethod decorator."},{"line_number":154,"context_line":"        raise NotImplementedError()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @record.register"},{"line_number":157,"context_line":"    def _("},{"line_number":158,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":159,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":160,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"},{"line_number":168,"context_line":"        \"\"\"Record a HealthcheckItem\"\"\""},{"line_number":169,"context_line":"        self.checks[item.name] \u003d item"},{"line_number":170,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":171,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[item.name]}\")"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"32b15c1f_43bcb945","line":172,"range":{"start_line":148,"start_character":0,"end_line":172,"end_character":0},"in_reply_to":"ac3e75a6_3c21fe56","updated":"2024-02-09 16:23:46.000000000","message":"++ this seems far more complex than it needs to be when just providing the HealthCheckItem would do it.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6d7f2b71ec808f3d6298682e9bd0e12d127693a3","unresolved":true,"context_lines":[{"line_number":145,"context_line":"            not check.expired(self.ttl) for check in checks"},{"line_number":146,"context_line":"        )"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @singledispatchmethod"},{"line_number":149,"context_line":"    def record(self, *args, **kwargs) -\u003e None:"},{"line_number":150,"context_line":"        \"\"\"Record a healthcheck item\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # this should never be called but we need to define it"},{"line_number":153,"context_line":"        # to enable the use of the @singledispatchmethod decorator."},{"line_number":154,"context_line":"        raise NotImplementedError()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @record.register"},{"line_number":157,"context_line":"    def _("},{"line_number":158,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":159,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":160,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        item \u003d HealthcheckItem("},{"line_number":163,"context_line":"            name, status\u003dstatus, output\u003doutput)"},{"line_number":164,"context_line":"        self.record(item)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    @record.register"},{"line_number":167,"context_line":"    def _(self, item: HealthcheckItem) -\u003e None:"},{"line_number":168,"context_line":"        \"\"\"Record a HealthcheckItem\"\"\""},{"line_number":169,"context_line":"        self.checks[item.name] \u003d item"},{"line_number":170,"context_line":"        if CONF.healthcheck.debug:"},{"line_number":171,"context_line":"            LOG.debug(f\"recorded healthcheck result {self.checks[item.name]}\")"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ac3e75a6_3c21fe56","line":172,"range":{"start_line":148,"start_character":0,"end_line":172,"end_character":0},"in_reply_to":"b8d7b144_aab91b11","updated":"2024-02-09 09:47:08.000000000","message":"or vice versa only letting the caller pass in the components of the HealthCheckItem that will be created within record","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"434199eb4006b8f98f1b00b3251996e513f40284","unresolved":true,"context_lines":[{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # TODO(sean-k-mooney): should we wrap expire_checks,"},{"line_number":177,"context_line":"    # reset and record in a lock?"},{"line_number":178,"context_line":"    def expire_checks(self) -\u003e None:"},{"line_number":179,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        to_remove \u003d []"}],"source_content_type":"text/x-python","patch_set":19,"id":"f64b8af4_ab9bf9b2","line":178,"range":{"start_line":176,"start_character":0,"end_line":178,"end_character":0},"updated":"2024-02-09 09:43:44.000000000","message":"If we call these from different eventlet then yes we need a lock to avoid modifying the checks list while iterating it.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def reset(self):"},{"line_number":174,"context_line":"        self.checks \u003d {}"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # TODO(sean-k-mooney): should we wrap expire_checks,"},{"line_number":177,"context_line":"    # reset and record in a lock?"},{"line_number":178,"context_line":"    def expire_checks(self) -\u003e None:"},{"line_number":179,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        to_remove \u003d []"}],"source_content_type":"text/x-python","patch_set":19,"id":"b1e2476e_b114f9c5","line":178,"range":{"start_line":176,"start_character":0,"end_line":178,"end_character":0},"in_reply_to":"f64b8af4_ab9bf9b2","updated":"2024-05-14 14:13:21.000000000","message":"Done","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0887fc5d241327777447af4f1e6e2f0ff33b0c7d","unresolved":true,"context_lines":[{"line_number":219,"context_line":"        if not self.uri.host:"},{"line_number":220,"context_line":"            LOG.error("},{"line_number":221,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":222,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":223,"context_line":"            return"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"}],"source_content_type":"text/x-python","patch_set":19,"id":"d7295160_2e9c1ef3","line":222,"updated":"2024-02-09 16:23:46.000000000","message":"I don\u0027t think we need a hard newline in here. In general it\u0027s terrible for log messages to be multiple lines, but if there\u0027s a good reason for it, it can sometimes be okay. I don\u0027t think this is a good reason.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"27718dffbb7afee9fd6c56f720cf82be40d087ba","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        if not self.uri.host:"},{"line_number":220,"context_line":"            LOG.error("},{"line_number":221,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":222,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":223,"context_line":"            return"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"}],"source_content_type":"text/x-python","patch_set":19,"id":"9c3db35c_ea263033","line":222,"in_reply_to":"0a190156_a72e55ba","updated":"2024-05-14 14:13:21.000000000","message":"Done","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2326de00ca59c1c8a214858e0b4c47fa4a7a3dd7","unresolved":true,"context_lines":[{"line_number":219,"context_line":"        if not self.uri.host:"},{"line_number":220,"context_line":"            LOG.error("},{"line_number":221,"context_line":"                f\"uri host must be set when using {self.uri.scheme}.\""},{"line_number":222,"context_line":"                f\"\\n e.g. localhost, 127.0.0.1 {CONF.host}\")"},{"line_number":223,"context_line":"            return"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"}],"source_content_type":"text/x-python","patch_set":19,"id":"0a190156_a72e55ba","line":222,"in_reply_to":"d7295160_2e9c1ef3","updated":"2024-02-13 10:14:35.000000000","message":"ya i dont know why i put the new line in.\n\nproably while i was locally debugging and forgot to remvoe it.","commit_id":"53b173180a7c1676af6ee2e629e1fd1d96515680"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6176bd07b4ea83fc1e7d0987c6ef6f0099798fe6","unresolved":true,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import datetime"},{"line_number":13,"context_line":"import dataclasses as dc"},{"line_number":14,"context_line":"import functools"},{"line_number":15,"context_line":"import typing as ty"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ea9e079e_714e1a78","line":13,"updated":"2024-05-14 14:25:32.000000000","message":"i also need to reorder these but ill do that after ci completes.","commit_id":"7a7bd320b980e4ac6187e67d72c2fefcd756923f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6176bd07b4ea83fc1e7d0987c6ef6f0099798fe6","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        raise NotImplementedError()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @record.register"},{"line_number":117,"context_line":"    def _record("},{"line_number":118,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":119,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":120,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"1abc1990_b4ccf9af","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":15},"updated":"2024-05-14 14:25:32.000000000","message":"so this need to be _ to keep mypy and hacking happy\n\nboth consider it a redefinition when its named","commit_id":"7a7bd320b980e4ac6187e67d72c2fefcd756923f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"11685fd19716f49c27717756600ea4afcc5035a4","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        raise NotImplementedError()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @record.register"},{"line_number":117,"context_line":"    def _record("},{"line_number":118,"context_line":"            self, name: str, status: HealthcheckStatus,"},{"line_number":119,"context_line":"            output: ty.Optional[str] \u003d None) -\u003e None:"},{"line_number":120,"context_line":"        \"\"\"Construct a HealthcheckItem and record it\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"0edbf156_6ed948cd","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":15},"in_reply_to":"1abc1990_b4ccf9af","updated":"2024-08-26 16:41:17.000000000","message":"Done","commit_id":"7a7bd320b980e4ac6187e67d72c2fefcd756923f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":142,"context_line":"        \"\"\"remove any checks that have expired\"\"\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        to_remove \u003d []"},{"line_number":145,"context_line":"        with self.lock.read_lock():"},{"line_number":146,"context_line":"            for key, check in self.checks.items():"},{"line_number":147,"context_line":"                if check.expired(self.ttl):"},{"line_number":148,"context_line":"                    to_remove.append(key)"},{"line_number":149,"context_line":"        with self.lock.write_lock():"},{"line_number":150,"context_line":"            for key in to_remove:"},{"line_number":151,"context_line":"                self.checks.pop(key, None)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def get_checks(self) -\u003e ty.Dict[str, HealthcheckItem]:"},{"line_number":154,"context_line":"        with self.lock.read_lock():"}],"source_content_type":"text/x-python","patch_set":21,"id":"e9725b99_a88ae0f1","line":151,"range":{"start_line":145,"start_character":0,"end_line":151,"end_character":42},"updated":"2024-08-27 10:49:36.000000000","message":"I think this can be as simple as:\n```\nwith self.lock.write_lock():\n    self.checks \u003d [check for check in self.checks if not check.expired(self.ttl)]\n    \n```","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            binary_name: str, notes: ty.Dict[str, str]"},{"line_number":164,"context_line":"    ):"},{"line_number":165,"context_line":"        self.uri: uri_reference \u003d uri_reference(url).normalize()"},{"line_number":166,"context_line":"        self.tracker: HealthcheckTracker \u003d tracker"},{"line_number":167,"context_line":"        self.service_id: str \u003d service_uuid"},{"line_number":168,"context_line":"        self.description: str \u003d binary_name"},{"line_number":169,"context_line":"        self.notes: ty.Dict[str, str] \u003d notes"}],"source_content_type":"text/x-python","patch_set":21,"id":"1d98ac8a_9439b46d","line":166,"updated":"2024-08-27 10:49:36.000000000","message":"I\u0027m wondering why the type hint is needed here and below as the args already has the type hint given.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"886f972ea72c331c21aa45cb4aebf5e91fb9995f","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            binary_name: str, notes: ty.Dict[str, str]"},{"line_number":164,"context_line":"    ):"},{"line_number":165,"context_line":"        self.uri: uri_reference \u003d uri_reference(url).normalize()"},{"line_number":166,"context_line":"        self.tracker: HealthcheckTracker \u003d tracker"},{"line_number":167,"context_line":"        self.service_id: str \u003d service_uuid"},{"line_number":168,"context_line":"        self.description: str \u003d binary_name"},{"line_number":169,"context_line":"        self.notes: ty.Dict[str, str] \u003d notes"}],"source_content_type":"text/x-python","patch_set":21,"id":"50b202e3_e3ae29b2","line":166,"in_reply_to":"1d931f69_0554473e","updated":"2024-09-02 08:18:58.000000000","message":"Sure lets see who @stephenfin@redhat.com thinks about it.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"addf148727dc50e99774929e3a8111292f554a82","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            binary_name: str, notes: ty.Dict[str, str]"},{"line_number":164,"context_line":"    ):"},{"line_number":165,"context_line":"        self.uri: uri_reference \u003d uri_reference(url).normalize()"},{"line_number":166,"context_line":"        self.tracker: HealthcheckTracker \u003d tracker"},{"line_number":167,"context_line":"        self.service_id: str \u003d service_uuid"},{"line_number":168,"context_line":"        self.description: str \u003d binary_name"},{"line_number":169,"context_line":"        self.notes: ty.Dict[str, str] \u003d notes"}],"source_content_type":"text/x-python","patch_set":21,"id":"1d931f69_0554473e","line":166,"in_reply_to":"1d98ac8a_9439b46d","updated":"2024-08-27 11:57:22.000000000","message":"it may not be but i would prefer to be consitent.\n\ni dont think speifying it only on the arg is good practice even if it can infer the type at the asignment point form that\n\ni have never seen any docuemation implying that it wil work that way but its reasonable that it could.\n\nstephen might know more.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8826f0e3ac97481ebe3b317c2d6bf5c432a0230b","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            binary_name: str, notes: ty.Dict[str, str]"},{"line_number":164,"context_line":"    ):"},{"line_number":165,"context_line":"        self.uri: uri_reference \u003d uri_reference(url).normalize()"},{"line_number":166,"context_line":"        self.tracker: HealthcheckTracker \u003d tracker"},{"line_number":167,"context_line":"        self.service_id: str \u003d service_uuid"},{"line_number":168,"context_line":"        self.description: str \u003d binary_name"},{"line_number":169,"context_line":"        self.notes: ty.Dict[str, str] \u003d notes"}],"source_content_type":"text/x-python","patch_set":21,"id":"d3714a56_a16f132c","line":166,"in_reply_to":"50b202e3_e3ae29b2","updated":"2024-09-03 01:47:49.000000000","message":"Short answer: @gibizer@gmail.com is correct and you don\u0027t need this here. They are inferred. \n\nLonger answer: mypy (and, from my limited experience, pyre and pyright) will infer the type of the variable from initial assignment. The only times you should need to do this if if you wanted to make the variable less specific (e.g. you wanted to allow `self.tracker` to be unset or set to a different type elsewhere/later)...\n\n```\nclass Foo:\n    def __init__(self):\n        self._bar: ty.Optional[Bar] \u003d None\n        \n    @property\n    def bar(self) -\u003e Bar:\n        if self._bar is None:\n            self._bar \u003d Bar()\n        return self._bar\n```\n\nor less generic (if initially assigning an empty mapping or sequence):\n\n```\nclass Foo:\n    def __init__(self):\n        self._bars: ty.List[Bar] \u003d []\n        \n    def add_bar(self, bar: Bar) -\u003e None:\n        self._bars.append(bar)\n\nIf you don\u0027t annotate `self._bar` in the first case, mypy will complain that the type of `self._bar` is `None` (because it infers the type from initial assignment). If you don\u0027t annotate `self._bars` in the second case, mypy will complain that it needs a type for the list since it can\u0027t infer the type.\n\nHope that helps.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d5d0f4a340f5e4a683eebf96cf8ae6952898ec6b","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            binary_name: str, notes: ty.Dict[str, str]"},{"line_number":164,"context_line":"    ):"},{"line_number":165,"context_line":"        self.uri: uri_reference \u003d uri_reference(url).normalize()"},{"line_number":166,"context_line":"        self.tracker: HealthcheckTracker \u003d tracker"},{"line_number":167,"context_line":"        self.service_id: str \u003d service_uuid"},{"line_number":168,"context_line":"        self.description: str \u003d binary_name"},{"line_number":169,"context_line":"        self.notes: ty.Dict[str, str] \u003d notes"}],"source_content_type":"text/x-python","patch_set":21,"id":"3b8b8c74_051f1db8","line":166,"in_reply_to":"d3714a56_a16f132c","updated":"2024-09-03 10:14:09.000000000","message":"ok so for me its more of a symmetry thing\n\ni dont really like mixing of infered types form the parmater list with specifying\nthem direclty on filed i am defiening that dont just pass though form the \n\n\nin a previous veriosn i had this marked as a dataclass and defiend socket as a filed but gibi asked me to refacctor it to not be a data class so its now a question fo style again.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def run(self) -\u003e None:"},{"line_number":178,"context_line":"        # TODO(sean-k-mooney): support unix sockets."},{"line_number":179,"context_line":"        if self.uri.scheme not in [\u0027tcp\u0027]:"},{"line_number":180,"context_line":"            LOG.error(f\"uri scheme {self.uri.scheme} is not supported\")"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        # for now we know that we only support tcp so a port is always"}],"source_content_type":"text/x-python","patch_set":21,"id":"14a2f614_6c5effe2","line":179,"updated":"2024-08-27 10:49:36.000000000","message":"you switched the default to http so I guess it needs to be changed here too","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"addf148727dc50e99774929e3a8111292f554a82","unresolved":true,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def run(self) -\u003e None:"},{"line_number":178,"context_line":"        # TODO(sean-k-mooney): support unix sockets."},{"line_number":179,"context_line":"        if self.uri.scheme not in [\u0027tcp\u0027]:"},{"line_number":180,"context_line":"            LOG.error(f\"uri scheme {self.uri.scheme} is not supported\")"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        # for now we know that we only support tcp so a port is always"}],"source_content_type":"text/x-python","patch_set":21,"id":"5437a712_cd9b0ec5","line":179,"in_reply_to":"14a2f614_6c5effe2","updated":"2024-08-27 11:57:22.000000000","message":"yep.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":179,"context_line":"        if self.uri.scheme not in [\u0027tcp\u0027]:"},{"line_number":180,"context_line":"            LOG.error(f\"uri scheme {self.uri.scheme} is not supported\")"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        # for now we know that we only support tcp so a port is always"},{"line_number":183,"context_line":"        # required in the uri."},{"line_number":184,"context_line":"        if not self.uri.port:"},{"line_number":185,"context_line":"            LOG.error(f\"uri port is required when using {self.uri.scheme}\")"},{"line_number":186,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":21,"id":"87449f40_0714a304","line":183,"range":{"start_line":182,"start_character":0,"end_line":183,"end_character":30},"updated":"2024-08-27 10:49:36.000000000","message":"Is it still true for the http scheme?","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"addf148727dc50e99774929e3a8111292f554a82","unresolved":true,"context_lines":[{"line_number":179,"context_line":"        if self.uri.scheme not in [\u0027tcp\u0027]:"},{"line_number":180,"context_line":"            LOG.error(f\"uri scheme {self.uri.scheme} is not supported\")"},{"line_number":181,"context_line":"            return"},{"line_number":182,"context_line":"        # for now we know that we only support tcp so a port is always"},{"line_number":183,"context_line":"        # required in the uri."},{"line_number":184,"context_line":"        if not self.uri.port:"},{"line_number":185,"context_line":"            LOG.error(f\"uri port is required when using {self.uri.scheme}\")"},{"line_number":186,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":21,"id":"a8ded261_160fc43e","line":183,"range":{"start_line":182,"start_character":0,"end_line":183,"end_character":30},"in_reply_to":"87449f40_0714a304","updated":"2024-08-27 11:57:22.000000000","message":"yes it is. we cant use port 80 as that might be in use by somethign else so with http the port will always be required","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":192,"context_line":"            return"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":195,"context_line":"        self.socket \u003d eventlet.listen(endpoint)"},{"line_number":196,"context_line":"        LOG.info(f\"binding healthcheck endpoint {endpoint}\")"},{"line_number":197,"context_line":"        wsgi.server(self.socket, self.request_handler)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"924a4fde_facdb996","line":195,"updated":"2024-08-27 10:49:36.000000000","message":"as this is currently on top of the eventlet removal series I feel we might want to implement this without direct eventlet dependency. But I can be convinced to do it with eventlet for now to speed up landing this.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"addf148727dc50e99774929e3a8111292f554a82","unresolved":true,"context_lines":[{"line_number":192,"context_line":"            return"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        endpoint \u003d (self.uri.host, int(self.uri.port))"},{"line_number":195,"context_line":"        self.socket \u003d eventlet.listen(endpoint)"},{"line_number":196,"context_line":"        LOG.info(f\"binding healthcheck endpoint {endpoint}\")"},{"line_number":197,"context_line":"        wsgi.server(self.socket, self.request_handler)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9c1cbc43_0b79c0fc","line":195,"in_reply_to":"924a4fde_facdb996","updated":"2024-08-27 11:57:22.000000000","message":"so i asked about that at the ptg and was told not to but i was also leanign in that direction.\n\ni can implement this using flask or the stdlib reference wsgi server.\nim leaning towrord fask bcause its a hard depency for keystone or neutron already\n\ngunicorn woudl be another ok choice as its used by ironic and some other i belive but we have a number of chioces.\n\nthis shoudl be simple enouch to swap out however as fundementally not much depends on this internally as i have isolated the webserver part form everything else via the endpoint.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":223,"context_line":"            # this is guarded by the min value of ttl so just"},{"line_number":224,"context_line":"            # assert instead of check since we don\u0027t need to do this"},{"line_number":225,"context_line":"            # at runtime."},{"line_number":226,"context_line":"            assert CONF.healthcheck.cache_control !\u003d 0"},{"line_number":227,"context_line":"        if CONF.healthcheck.cache_control \u003d\u003d -1:"},{"line_number":228,"context_line":"            headers.append((constants.CACHE_CONTROL, constants.NO_CACHE))"},{"line_number":229,"context_line":"        elif CONF.healthcheck.cache_control \u003e 0:"}],"source_content_type":"text/x-python","patch_set":21,"id":"885c7b09_d7083986","line":226,"updated":"2024-08-27 10:49:36.000000000","message":"The ttl config is allowed to be configured to 0 too:\n\n\u003e If set to 0 health-check items will not expire.\n\nSo cache_control\u003dNone and ttl\u003d0 config will result in the assert failing.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"}],"nova/tests/functional/healthcheck/test_manager.py":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"892ebd8ca5e11e1e8d8b99d0a6a905b5e2ed36e7","unresolved":true,"context_lines":[{"line_number":32,"context_line":"        self.manager_thread.start()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_healthcheck_endpoint(self):"},{"line_number":35,"context_line":"        self.SERVICE_NAME \u003d \"test\""},{"line_number":36,"context_line":"        response \u003d requests.get(\"http://127.0.0.1:42424/health\")"},{"line_number":37,"context_line":"        self.assertEqual(response.status_code, 200)"},{"line_number":38,"context_line":"        expected_content \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"d8ebd64b_b82dd72b","line":35,"updated":"2023-08-09 07:15:35.000000000","message":"missed to remove it, will fix in next PS","commit_id":"b409b9873189996b1593660a97ed86b8d121971f"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.manager_thread.start()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_healthcheck_endpoint(self):"},{"line_number":35,"context_line":"        self.SERVICE_NAME \u003d \"test\""},{"line_number":36,"context_line":"        response \u003d requests.get(\"http://127.0.0.1:42424/health\")"},{"line_number":37,"context_line":"        self.assertEqual(response.status_code, 200)"},{"line_number":38,"context_line":"        expected_content \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"2cb0842c_3fff5177","line":35,"in_reply_to":"d8ebd64b_b82dd72b","updated":"2023-10-13 09:10:00.000000000","message":"Done","commit_id":"b409b9873189996b1593660a97ed86b8d121971f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":25,"context_line":"        super().setUp()"},{"line_number":26,"context_line":"        # We should not bind to a specific port to avoid issues with parallel"},{"line_number":27,"context_line":"        # test execution, so we let the OS pick one for us."},{"line_number":28,"context_line":"        self.flags(group\u003d\"healthcheck\", uri\u003d\"tcp://0.0.0.0:0\")"},{"line_number":29,"context_line":"        self.manager \u003d hm.HealthcheckManager("},{"line_number":30,"context_line":"            self.SERVICE_ID, self.SERVICE_NAME"},{"line_number":31,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":21,"id":"bc98587c_2f782079","line":28,"updated":"2024-08-27 10:49:36.000000000","message":"I think you want to change this to http too as the default scheme changed","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":21,"id":"b3e2f8fa_32267096","line":49,"updated":"2024-08-27 10:49:36.000000000","message":"It would be nice to assert the headers here too","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"}],"nova/tests/unit/healthcheck/test_manager.py":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":45,"context_line":"        status \u003d 1"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        item \u003d hm.HealthcheckItem(name\u003dname, status\u003dstatus)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.assertEqual(item.name, name)"},{"line_number":50,"context_line":"        self.assertEqual(item.status, status)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"c670952e_68d4e7fb","line":48,"updated":"2023-08-01 06:18:22.000000000","message":"name should only be string and staus should be as HealthcheckStatus, right ?","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        status \u003d 1"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        item \u003d hm.HealthcheckItem(name\u003dname, status\u003dstatus)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.assertEqual(item.name, name)"},{"line_number":50,"context_line":"        self.assertEqual(item.status, status)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"22ca4a24_4c4dd27b","line":48,"in_reply_to":"62546586_f94711e3","updated":"2023-10-13 09:10:00.000000000","message":"I meant alphabetical.","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"eec537bfcda94f3554b6f23c3f6128e7da46beac","unresolved":true,"context_lines":[{"line_number":45,"context_line":"        status \u003d 1"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        item \u003d hm.HealthcheckItem(name\u003dname, status\u003dstatus)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.assertEqual(item.name, name)"},{"line_number":50,"context_line":"        self.assertEqual(item.status, status)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"62546586_f94711e3","line":48,"in_reply_to":"c670952e_68d4e7fb","updated":"2023-08-01 06:27:54.000000000","message":"okay the value of status wil be string, so status is fine.\n\nbut I think, name should only be string.","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Wait for a ttl to get expired"},{"line_number":72,"context_line":"        sleep(set_ttl + 1)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # ttl should expired"},{"line_number":75,"context_line":"        self.assertTrue(item.expired(ttl))"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"41e641fe_05fcc123","line":73,"updated":"2023-08-01 06:18:22.000000000","message":"is sleep alright, or we should use something else?","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Wait for a ttl to get expired"},{"line_number":72,"context_line":"        sleep(set_ttl + 1)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # ttl should expired"},{"line_number":75,"context_line":"        self.assertTrue(item.expired(ttl))"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9170b811_5848539c","line":73,"in_reply_to":"41e641fe_05fcc123","updated":"2023-10-13 09:10:00.000000000","message":"Done","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"df2ed28117f65898f43893227b0e6e953736c194","unresolved":true,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class TestHealthcheckEndpoint(test.NoDBTestCase):"},{"line_number":115,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"431bdcd2_109e1d25","line":115,"updated":"2023-08-01 06:18:22.000000000","message":"how to test tcp uri - \u0027tcp://0.0.0.0:42424\u0027\nusing requests module ?","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"4c944e98d34caa8a50dd3342e4ee77b063e972fb","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class TestHealthcheckEndpoint(test.NoDBTestCase):"},{"line_number":115,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"aebccaa9_26e2b2c4","line":115,"in_reply_to":"431bdcd2_109e1d25","updated":"2023-10-13 09:10:00.000000000","message":"Done","commit_id":"04fe65a02ba6e4d4110ec68db85ccac766ce9901"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":105,"context_line":"        self.assertFalse(item.expired(delta))"},{"line_number":106,"context_line":"        # item is expired after ttl"},{"line_number":107,"context_line":"        self.time_fix.advance_time_delta(delta)"},{"line_number":108,"context_line":"        self.assertTrue(item.expired(delta))  # t\u003d10 ttl\u003d5"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class TestHealthcheckTracker(HealthcheckBaseTestCase):"}],"source_content_type":"text/x-python","patch_set":21,"id":"76d4958f_27435441","line":108,"updated":"2024-08-27 10:49:36.000000000","message":"I suggest to either have a separate ttl variable to pass or pass delta as kwargs to item.expired() as the current code is hard to follow due to delta is used for two independent things.","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        # Advance time by 3 minutes"},{"line_number":209,"context_line":"        self.time_fix.advance_time_delta(datetime.timedelta(minutes\u003d3))"},{"line_number":210,"context_line":"        # assert that passing items are not removed and failing item is"},{"line_number":211,"context_line":"        # preserved when we call expire_checks"},{"line_number":212,"context_line":"        tracker.expire_checks()"},{"line_number":213,"context_line":"        self.assertEqual(1, len(tracker.checks))"}],"source_content_type":"text/x-python","patch_set":21,"id":"b6ee71f9_e29777e9","line":210,"updated":"2024-08-27 10:49:36.000000000","message":"do you mean passing items are removed?","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":213,"context_line":"        self.assertEqual(1, len(tracker.checks))"},{"line_number":214,"context_line":"        self.assertTrue(tracker.failing)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        # Advance time by 5 minutesfrom oslo_serialization import jsonutils"},{"line_number":217,"context_line":"        self.time_fix.advance_time_delta(datetime.timedelta(minutes\u003d5))"},{"line_number":218,"context_line":"        # assert that all items are removed when we call expire_checks"},{"line_number":219,"context_line":"        tracker.expire_checks()"}],"source_content_type":"text/x-python","patch_set":21,"id":"7f8f6614_bc205142","line":216,"updated":"2024-08-27 10:49:36.000000000","message":"nit: remove the second half of the comment as it seems to be unintended","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":232,"context_line":"    \"\"\""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def create_endpoint(self):"},{"line_number":235,"context_line":"        uri \u003d \"tcp://0.0.0.0:0\""},{"line_number":236,"context_line":"        tracker \u003d mock.MagicMock()"},{"line_number":237,"context_line":"        servivce_id \u003d \"fake-service-id\""},{"line_number":238,"context_line":"        description \u003d \"fake-service\""}],"source_content_type":"text/x-python","patch_set":21,"id":"880f2ab6_b1b6f22c","line":235,"updated":"2024-08-27 10:49:36.000000000","message":"I think you should test with http now","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":242,"context_line":"            uri, tracker, servivce_id, description, notes)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_endpoint(self):"},{"line_number":245,"context_line":"        uri \u003d \"tcp://0.0.0.0:0\""},{"line_number":246,"context_line":"        tracker \u003d mock.MagicMock()"},{"line_number":247,"context_line":"        servivce_id \u003d \"fake-service-id\""},{"line_number":248,"context_line":"        description \u003d \"fake-service\""}],"source_content_type":"text/x-python","patch_set":21,"id":"c9122a5b_fb3e311b","line":245,"updated":"2024-08-27 10:49:36.000000000","message":"ditto","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0be85e0883c1faf9b2262c52a45b59f68d438cc2","unresolved":true,"context_lines":[{"line_number":337,"context_line":"            endpoint.code, ["},{"line_number":338,"context_line":"                (\u0027Content-Type\u0027, \u0027application/health+json\u0027),"},{"line_number":339,"context_line":"                (\u0027Cache-Control\u0027, \u0027max-age\u003d42\u0027)])"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    @mock.patch.object(hm.LOG, \"error\")"},{"line_number":342,"context_line":"    @mock.patch(\u0027eventlet.listen\u0027)"},{"line_number":343,"context_line":"    @mock.patch(\u0027eventlet.wsgi.server\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"119e41b0_92f9c980","line":340,"updated":"2024-08-27 10:49:36.000000000","message":"you could add a test case that sets:\n```\nself.flags(ttl\u003d\"0\", group\u003d\"healthcheck\") \n```\nto reproduce the assert error when the code defaults cache_control to ttl","commit_id":"266c453c21512372f0d33c7e7b55634226143ca7"}]}
