)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"aba612d3c3cc0c57bea6342ae2b5014337fb57fe","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a006d4da_5fd96578","updated":"2024-04-10 14:25:20.000000000","message":"I was first thinking whether this could be a bug in bash, but it could also be intended but badly documented behavior. Comparing to other uses of `-n` the missing quotes seem to be more relevant, though.\n\nI also checked that this is actually the only occurrence of `[ -n ... ]` without quotes in our code, so no other hidden issues afaict.","commit_id":"aeadb7787c7f03806af23f6921dc1ead603afe37"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"56f2ebcfac6f5f281343a31ae263c49b040839bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6831a044_ae5c3f74","updated":"2024-04-10 07:15:31.000000000","message":"lgtm, although that makes me think about what we should do with the other similar conditions, many have just single brackets","commit_id":"aeadb7787c7f03806af23f6921dc1ead603afe37"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"50f77d3de7b43bb7cf55f90dd08e88576fc866eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"8d59a849_3f132e53","updated":"2024-04-11 06:46:34.000000000","message":"I used quotes instead of double brackets as asked by Jens. I tested it and it works too. I also rewrote the commit message to reflect this change. Thanks for pointing this out to me.","commit_id":"0df2bb53caf08900e89c91e82eb5f75cba587a8c"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"ed83c3010b1ec5e50fdf1c83a384821a35ce988e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7cbc0eed_524d6db3","updated":"2024-04-12 07:46:45.000000000","message":"thanks!","commit_id":"c336b873421c954921ee26c22bd9bfe65b330d0c"}],"lib/neutron_plugins/ovn_agent":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"aba612d3c3cc0c57bea6342ae2b5014337fb57fe","unresolved":true,"context_lines":[{"line_number":558,"context_line":"        sample_file\u003d$NEUTRON_DIR/etc/neutron_ovn_metadata_agent.ini.sample"},{"line_number":559,"context_line":"        config_file\u003d$OVN_META_CONF"},{"line_number":560,"context_line":"    fi"},{"line_number":561,"context_line":"    if [[ -n ${config_file} ]]; then"},{"line_number":562,"context_line":"        sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"644e8fa9_6dd3d304","line":561,"updated":"2024-04-10 14:25:20.000000000","message":"Actually what is different compared to other instances is the missing quotes `\"\"` around the variable. So a more standard fix would be:\n\nif [ -n \"$config_file\" ]; then\n\nalso dropping the unneeded braces, which would make the code more in line with the remainder of this plugin.","commit_id":"aeadb7787c7f03806af23f6921dc1ead603afe37"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"f415dd440c9b0e7997a86fb594d0ad9007600221","unresolved":true,"context_lines":[{"line_number":558,"context_line":"        sample_file\u003d$NEUTRON_DIR/etc/neutron_ovn_metadata_agent.ini.sample"},{"line_number":559,"context_line":"        config_file\u003d$OVN_META_CONF"},{"line_number":560,"context_line":"    fi"},{"line_number":561,"context_line":"    if [ -n \"${config_file}\" ]; then"},{"line_number":562,"context_line":"        sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"64959eaa_a6b7726a","line":561,"range":{"start_line":561,"start_character":14,"end_line":561,"end_character":15},"updated":"2024-04-11 08:00:24.000000000","message":"let\u0027s also drop the curly brackets {} so that it matches the style of other similar if-statements in this file - they all have just [ -n \"$var\" ]","commit_id":"0df2bb53caf08900e89c91e82eb5f75cba587a8c"},{"author":{"_account_id":34975,"name":"Jaromír Wysoglad","email":"jwysogla@redhat.com","username":"jwysogla"},"change_message_id":"a1efbdfacfef75e550a7a94a5476cd5e58b47c8a","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        sample_file\u003d$NEUTRON_DIR/etc/neutron_ovn_metadata_agent.ini.sample"},{"line_number":559,"context_line":"        config_file\u003d$OVN_META_CONF"},{"line_number":560,"context_line":"    fi"},{"line_number":561,"context_line":"    if [ -n \"${config_file}\" ]; then"},{"line_number":562,"context_line":"        sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR"},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"        mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2"}],"source_content_type":"application/x-shellscript","patch_set":2,"id":"e68e3207_91ffdcb4","line":561,"range":{"start_line":561,"start_character":14,"end_line":561,"end_character":15},"in_reply_to":"64959eaa_a6b7726a","updated":"2024-04-12 06:41:23.000000000","message":"Done","commit_id":"0df2bb53caf08900e89c91e82eb5f75cba587a8c"}]}
