)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000002,"name":"Serge Bazanski","display_name":"Serge","email":"serge@monogon.tech","username":"serge","avatars":[{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"dd53edb24b7fc1795ff1a2749d53e3edf27f7d72","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f1919799_9db2a2ed","updated":"2023-04-13 14:12:59.000000000","message":"This still seems race\u0027y:\n\nif","commit_id":"11566f7d32dae09266d440cc9aa873b2cec63f3f"}],"metropolis/pkg/supervisor/supervisor_support.go":[{"author":{"_account_id":1000002,"name":"Serge Bazanski","display_name":"Serge","email":"serge@monogon.tech","username":"serge","avatars":[{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"dd53edb24b7fc1795ff1a2749d53e3edf27f7d72","unresolved":true,"context_lines":[{"line_number":134,"context_line":"\t}"},{"line_number":135,"context_line":"}"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"// SignalChan takes a channel which can be used to send signals to the"},{"line_number":138,"context_line":"// supervised process. This is the only safe way of sending signals to processes"},{"line_number":139,"context_line":"// supervised by RunCommand."},{"line_number":140,"context_line":"func SignalChan(s \u003c-chan os.Signal) RunCommandOption {"},{"line_number":141,"context_line":"\treturn RunCommandOption{"},{"line_number":142,"context_line":"\t\tsignal: s,"}],"source_content_type":"text/x-go","patch_set":1,"id":"12800393_c9d9bdbf","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":28},"updated":"2023-04-13 14:12:59.000000000","message":"If we expect the library user to provide a channel here then we need to document at least two more things:\n\n 1. What size should the channel be?\n 2. When will the channel be drained by the supervised process? When will writing to the channel block?","commit_id":"11566f7d32dae09266d440cc9aa873b2cec63f3f"},{"author":{"_account_id":1000001,"name":"Lorenz Brun","display_name":"Lorenz","email":"lorenz@monogon.tech","username":"lorenz","avatars":[{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"d9ea4407e551f779e86c3ef56ed2df517cd43c52","unresolved":true,"context_lines":[{"line_number":134,"context_line":"\t}"},{"line_number":135,"context_line":"}"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"// SignalChan takes a channel which can be used to send signals to the"},{"line_number":138,"context_line":"// supervised process. This is the only safe way of sending signals to processes"},{"line_number":139,"context_line":"// supervised by RunCommand."},{"line_number":140,"context_line":"func SignalChan(s \u003c-chan os.Signal) RunCommandOption {"},{"line_number":141,"context_line":"\treturn RunCommandOption{"},{"line_number":142,"context_line":"\t\tsignal: s,"}],"source_content_type":"text/x-go","patch_set":1,"id":"bf23859b_bf0d3ab8","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":28},"in_reply_to":"12800393_c9d9bdbf","updated":"2023-04-13 15:37:58.000000000","message":"1. It doesn\u0027t really matter, for reloads unbuffered or 1 are good choices, for other things maybe a lot more.\n2. What do you think about adding \u0027After the process has been started, signals will start to be read from this channel and sent to the process until it has exited.\u0027 to the comment?","commit_id":"11566f7d32dae09266d440cc9aa873b2cec63f3f"},{"author":{"_account_id":1000001,"name":"Lorenz Brun","display_name":"Lorenz","email":"lorenz@monogon.tech","username":"lorenz","avatars":[{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"6dde6c7ca1fae9514c8cb8e261aee636cdc897c6","unresolved":false,"context_lines":[{"line_number":134,"context_line":"\t}"},{"line_number":135,"context_line":"}"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"// SignalChan takes a channel which can be used to send signals to the"},{"line_number":138,"context_line":"// supervised process. This is the only safe way of sending signals to processes"},{"line_number":139,"context_line":"// supervised by RunCommand."},{"line_number":140,"context_line":"func SignalChan(s \u003c-chan os.Signal) RunCommandOption {"},{"line_number":141,"context_line":"\treturn RunCommandOption{"},{"line_number":142,"context_line":"\t\tsignal: s,"}],"source_content_type":"text/x-go","patch_set":1,"id":"26da8c89_00e70208","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":28},"in_reply_to":"2ca0502c_39f1021e","updated":"2023-04-18 11:15:10.000000000","message":"Done","commit_id":"11566f7d32dae09266d440cc9aa873b2cec63f3f"},{"author":{"_account_id":1000002,"name":"Serge Bazanski","display_name":"Serge","email":"serge@monogon.tech","username":"serge","avatars":[{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"04cb186891f7a788b0b281d3e24180f9acff4867","unresolved":true,"context_lines":[{"line_number":134,"context_line":"\t}"},{"line_number":135,"context_line":"}"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"// SignalChan takes a channel which can be used to send signals to the"},{"line_number":138,"context_line":"// supervised process. This is the only safe way of sending signals to processes"},{"line_number":139,"context_line":"// supervised by RunCommand."},{"line_number":140,"context_line":"func SignalChan(s \u003c-chan os.Signal) RunCommandOption {"},{"line_number":141,"context_line":"\treturn RunCommandOption{"},{"line_number":142,"context_line":"\t\tsignal: s,"}],"source_content_type":"text/x-go","patch_set":1,"id":"2ca0502c_39f1021e","line":139,"range":{"start_line":137,"start_character":0,"end_line":139,"end_character":28},"in_reply_to":"bf23859b_bf0d3ab8","updated":"2023-04-17 11:31:27.000000000","message":"I think the following comment would summarize the possible gotchas:\n\n```\n// ...\n//\n// The given channel will be read from as long as the underlying process is \n// running. If the process doesn\u0027t start successfully the channel will not be\n// read. When the process exits, the channel will stop being read.\n//\n// With the above in mind, and also taking into account the inherent lack of \n// reliability in delivering any process-handled signals in POSIX/Linux, it is\n// recommended to use unbuffered channels, always write to them in a non-blocking \n// fashion (eg. in a select { ... default: } block), and to not rely only on the\n// signal delivery mechanism for the intended behaviour.\n//\n// For example, if the signals are used to trigger some configuration reload, \n// these configuration reloads should either be verified and signal delivery should  \n// be retried until confirmed successful, or there should be a backup periodic\n// reload performed by the target process independently of signal-based reload\n// triggers.\n//\n// Another example: if the signal delivered is a SIGTERM used to gracefully \n// terminate some process, it should be attempted to be delivered a number of \n// times before finally SIGKILLing the process.\n```","commit_id":"11566f7d32dae09266d440cc9aa873b2cec63f3f"}]}
