)]}'
{"oslo_utils/strutils.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"53025fcba9334b5938510732bea762fa65366bb6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                  \u0027cephclientkey\u0027, \u0027keystonecredential\u0027,"},{"line_number":68,"context_line":"                  \u0027barbicansimplecryptokek\u0027, \u0027cephrgwkey\u0027, \u0027swifthashsuffix\u0027,"},{"line_number":69,"context_line":"                  \u0027migrationsshkey\u0027, \u0027cephmdskey\u0027, \u0027cephmonkey\u0027]"},{"line_number":70,"context_line":"_LOWER_SANITIZE_KEYS \u003d [k.lower() for k in _SANITIZE_KEYS]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"# NOTE(ldbragst): Let\u0027s build a list of regex objects using the list of"},{"line_number":73,"context_line":"# _SANITIZE_KEYS we already have. This way, we only have to add the new key"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_657ce4b5","line":70,"updated":"2019-11-21 10:21:14.000000000","message":"An alternative approach to this might be to add a unit tests that verified all the _SANITIZE_KEYS are lowered. Then we wouldn\u0027t need the duplication and it could still be verified.","commit_id":"1dfbc66774e0ebdd7b6db4d4f0a28b43e2397c7c"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"e18987daabd8f0f2a5771f5e6de667910027e845","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                  \u0027cephclientkey\u0027, \u0027keystonecredential\u0027,"},{"line_number":68,"context_line":"                  \u0027barbicansimplecryptokek\u0027, \u0027cephrgwkey\u0027, \u0027swifthashsuffix\u0027,"},{"line_number":69,"context_line":"                  \u0027migrationsshkey\u0027, \u0027cephmdskey\u0027, \u0027cephmonkey\u0027]"},{"line_number":70,"context_line":"_LOWER_SANITIZE_KEYS \u003d [k.lower() for k in _SANITIZE_KEYS]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"# NOTE(ldbragst): Let\u0027s build a list of regex objects using the list of"},{"line_number":73,"context_line":"# _SANITIZE_KEYS we already have. This way, we only have to add the new key"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_25310c0c","line":70,"in_reply_to":"3fa7e38b_657ce4b5","updated":"2019-11-21 10:23:35.000000000","message":"hmmm, that would allow to avoid a duplicated dataset indeed.\n\nBut we should add some instructions for the _SANITIZE_KEYS in order to ensure ppl know it must be lowered.\n\nFor the unit, a comparison of the original set to a lowered one should be enough, right?","commit_id":"1dfbc66774e0ebdd7b6db4d4f0a28b43e2397c7c"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"a5b4b59ad441fcab12ea35e57f7cb2fcd9fba4b5","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# NOTE(flaper87): The following globals are used by `mask_password` and"},{"line_number":58,"context_line":"#                 `mask_dict_password`. They should all be lowercase."},{"line_number":59,"context_line":"_SANITIZE_KEYS \u003d [\u0027adminpass\u0027, \u0027admin_pass\u0027, \u0027password\u0027, \u0027admin_password\u0027,"},{"line_number":60,"context_line":"                  \u0027auth_token\u0027, \u0027new_pass\u0027, \u0027auth_password\u0027, \u0027secret_uuid\u0027,"},{"line_number":61,"context_line":"                  \u0027secret\u0027, \u0027sys_pswd\u0027, \u0027token\u0027, \u0027configdrive\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_f0c73097","line":58,"range":{"start_line":58,"start_character":45,"end_line":58,"end_character":51},"updated":"2019-11-21 10:39:47.000000000","message":"must\nshould imply \"it\u0027s OK with other things\".","commit_id":"f8ca535fa89d6224501cf6b214a0b76078251419"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"06ec17f1d210f78e962c3b2385b5a2fa439dcf81","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# NOTE(flaper87): The following globals are used by `mask_password` and"},{"line_number":58,"context_line":"#                 `mask_dict_password`. They should all be lowercase."},{"line_number":59,"context_line":"_SANITIZE_KEYS \u003d [\u0027adminpass\u0027, \u0027admin_pass\u0027, \u0027password\u0027, \u0027admin_password\u0027,"},{"line_number":60,"context_line":"                  \u0027auth_token\u0027, \u0027new_pass\u0027, \u0027auth_password\u0027, \u0027secret_uuid\u0027,"},{"line_number":61,"context_line":"                  \u0027secret\u0027, \u0027sys_pswd\u0027, \u0027token\u0027, \u0027configdrive\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_90b6fc24","line":58,"range":{"start_line":58,"start_character":45,"end_line":58,"end_character":51},"in_reply_to":"3fa7e38b_f0c73097","updated":"2019-11-21 10:40:54.000000000","message":"Done","commit_id":"f8ca535fa89d6224501cf6b214a0b76078251419"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e08f3591150a3a7d9547c9ca0a204fdd11152c0c","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"},{"line_number":338,"context_line":"    # we don\u0027t have to mask any passwords."},{"line_number":339,"context_line":"    for key in _SANITIZE_KEYS:"},{"line_number":340,"context_line":"        if key.lower() in message.lower():"},{"line_number":341,"context_line":"            for pattern in _SANITIZE_PATTERNS_2[key]:"},{"line_number":342,"context_line":"                message \u003d re.sub(pattern, substitute2, message)"},{"line_number":343,"context_line":"            for pattern in _SANITIZE_PATTERNS_1[key]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_f0b17002","side":"PARENT","line":340,"range":{"start_line":340,"start_character":15,"end_line":340,"end_character":22},"updated":"2019-11-21 10:57:03.000000000","message":"Not sure to see the benefits to remove that...\n\nSanitize test will help to formalize things by forcing lowercase but personnaly I\u0027m not a big fan to expect something from a comment in the code who ask for formalize.\n\nOften comments are not updated or forgotten and they don\u0027t really reflect the real situation while code him is explicite in this kind of situation and code like this avoid any doubts.\n\nI really prefer keep the `lower` function calls and they are compatible with the sanitize test part.\n\nThoughts?","commit_id":"ed70bd3cd10eae2a34a5e9bd5d1fe0a6791ab3de"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"c3a0b9c4ac3569200e3b88a0caa97bf5e0fefcd4","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"},{"line_number":338,"context_line":"    # we don\u0027t have to mask any passwords."},{"line_number":339,"context_line":"    for key in _SANITIZE_KEYS:"},{"line_number":340,"context_line":"        if key.lower() in message.lower():"},{"line_number":341,"context_line":"            for pattern in _SANITIZE_PATTERNS_2[key]:"},{"line_number":342,"context_line":"                message \u003d re.sub(pattern, substitute2, message)"},{"line_number":343,"context_line":"            for pattern in _SANITIZE_PATTERNS_1[key]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_43d2fd5d","side":"PARENT","line":340,"range":{"start_line":340,"start_character":15,"end_line":340,"end_character":22},"in_reply_to":"3fa7e38b_f0b17002","updated":"2019-11-21 13:54:12.000000000","message":"\u003e Not sure to see the benefits to remove that...\n\nSimply to remove the extra processing as this code will be executed many times. Granted, it may be a premature optimization.\n\nI created this follow up after the feedback from Ben on my previous patch. It might provide some extra context; https://review.opendev.org/#/c/694515/\n\n\n \u003e Sanitize test will help to formalize things by forcing lowercase\n \u003e but personnaly I\u0027m not a big fan to expect something from a comment\n \u003e in the code who ask for formalize.\n \u003e \n \u003e Often comments are not updated or forgotten and they don\u0027t really\n \u003e reflect the real situation while code him is explicite in this kind\n \u003e of situation and code like this avoid any doubts.\n \u003e \n \u003e I really prefer keep the `lower` function calls and they are\n \u003e compatible with the sanitize test part.\n \u003e \n \u003e Thoughts?","commit_id":"ed70bd3cd10eae2a34a5e9bd5d1fe0a6791ab3de"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"51b1bcacca93526c064e972c0c4768699edb3354","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    # specified in _SANITIZE_KEYS, if not then just return the message since"},{"line_number":338,"context_line":"    # we don\u0027t have to mask any passwords."},{"line_number":339,"context_line":"    for key in _SANITIZE_KEYS:"},{"line_number":340,"context_line":"        if key.lower() in message.lower():"},{"line_number":341,"context_line":"            for pattern in _SANITIZE_PATTERNS_2[key]:"},{"line_number":342,"context_line":"                message \u003d re.sub(pattern, substitute2, message)"},{"line_number":343,"context_line":"            for pattern in _SANITIZE_PATTERNS_1[key]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_70726014","side":"PARENT","line":340,"range":{"start_line":340,"start_character":15,"end_line":340,"end_character":22},"in_reply_to":"3fa7e38b_f0b17002","updated":"2019-11-21 11:02:51.000000000","message":"I\u0027d rather use Dougal proposal in order to enforce the lower keys in the _SANITIZE_KEYS:\n- calling \"key.lower()\" (and derivatives) are OK, but we need perfs in here. cpu cycles, and so on. Might be best to avoid the [key.lower() for key in _SANITIZE_KEYS] for that same reason.\n- the unit-test will fail if someone doesn\u0027t follow the \"rule\", with a message we can understand easily\n- how many new key have been added in the past?\n\nFor the sake of KISS and cpu cycles, it\u0027s better to ensure all is entered as lower chars and run a one-time unit test upon changes than, during each class call, re-map the content.","commit_id":"ed70bd3cd10eae2a34a5e9bd5d1fe0a6791ab3de"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"e08f3591150a3a7d9547c9ca0a204fdd11152c0c","unresolved":false,"context_lines":[{"line_number":413,"context_line":"        k_matched \u003d False"},{"line_number":414,"context_line":"        if isinstance(k, six.string_types):"},{"line_number":415,"context_line":"            for sani_key in _SANITIZE_KEYS:"},{"line_number":416,"context_line":"                if sani_key.lower() in k.lower():"},{"line_number":417,"context_line":"                    out[k] \u003d secret"},{"line_number":418,"context_line":"                    k_matched \u003d True"},{"line_number":419,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_d0ca346c","side":"PARENT","line":416,"range":{"start_line":416,"start_character":28,"end_line":416,"end_character":35},"updated":"2019-11-21 10:57:03.000000000","message":"Same commment","commit_id":"ed70bd3cd10eae2a34a5e9bd5d1fe0a6791ab3de"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"8cf6dd4c54edf7a6e62fb830bcaba5aaee8486cb","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                  \u0027cephclientkey\u0027, \u0027keystonecredential\u0027,"},{"line_number":68,"context_line":"                  \u0027barbicansimplecryptokek\u0027, \u0027cephrgwkey\u0027, \u0027swifthashsuffix\u0027,"},{"line_number":69,"context_line":"                  \u0027migrationsshkey\u0027, \u0027cephmdskey\u0027, \u0027cephmonkey\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"# NOTE(ldbragst): Let\u0027s build a list of regex objects using the list of"},{"line_number":72,"context_line":"# _SANITIZE_KEYS we already have. This way, we only have to add the new key"},{"line_number":73,"context_line":"# to the list of _SANITIZE_KEYS and we can generate regular expressions"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_83feb5ac","line":70,"updated":"2019-11-21 14:07:15.000000000","message":"My intent was to add something like this:\n\n_SANITIZE_KEYS \u003d [k.lower() for k in _SANITIZE_KEYS]\n\nhere so that we still enforce the lower-casing, it just doesn\u0027t have to happen every time through the loop.","commit_id":"6093e0a4d745921f0f67ec188081ca9f3830f67f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"1cb088bf2682e69d44b66fb0c8fc2d67952a9d0c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                  \u0027cephclientkey\u0027, \u0027keystonecredential\u0027,"},{"line_number":68,"context_line":"                  \u0027barbicansimplecryptokek\u0027, \u0027cephrgwkey\u0027, \u0027swifthashsuffix\u0027,"},{"line_number":69,"context_line":"                  \u0027migrationsshkey\u0027, \u0027cephmdskey\u0027, \u0027cephmonkey\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"# NOTE(ldbragst): Let\u0027s build a list of regex objects using the list of"},{"line_number":72,"context_line":"# _SANITIZE_KEYS we already have. This way, we only have to add the new key"},{"line_number":73,"context_line":"# to the list of _SANITIZE_KEYS and we can generate regular expressions"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_c3034d41","line":70,"in_reply_to":"3fa7e38b_83feb5ac","updated":"2019-11-21 14:23:52.000000000","message":"Yup, I had done this in patchset 2. It then occurred to me that a unit test might make more sense. However, happy to revert to that. I don\u0027t have strong feelings.","commit_id":"6093e0a4d745921f0f67ec188081ca9f3830f67f"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9436e6d54c87a8358c23e2bea2b60f9edfd18a8d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                  \u0027cephclientkey\u0027, \u0027keystonecredential\u0027,"},{"line_number":68,"context_line":"                  \u0027barbicansimplecryptokek\u0027, \u0027cephrgwkey\u0027, \u0027swifthashsuffix\u0027,"},{"line_number":69,"context_line":"                  \u0027migrationsshkey\u0027, \u0027cephmdskey\u0027, \u0027cephmonkey\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"# NOTE(ldbragst): Let\u0027s build a list of regex objects using the list of"},{"line_number":72,"context_line":"# _SANITIZE_KEYS we already have. This way, we only have to add the new key"},{"line_number":73,"context_line":"# to the list of _SANITIZE_KEYS and we can generate regular expressions"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_263a6fe5","line":70,"in_reply_to":"3fa7e38b_c3034d41","updated":"2019-11-21 15:16:11.000000000","message":"Oh, hah, I should have looked at the unit test changes too. I\u0027m fine with the unit test solution as well. If anyone is modifying this list at runtime then they\u0027ve done something very naughty and deserve whatever they get. :-)","commit_id":"6093e0a4d745921f0f67ec188081ca9f3830f67f"}]}
