)]}'
{"kuryr_kubernetes/controller/drivers/utils.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"41eb494fea442e13aedf323ac50059ffcd2017d8","unresolved":false,"context_lines":[{"line_number":407,"context_line":"    return True"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"def match_selector(selector, labels):"},{"line_number":411,"context_line":"    if selector is None:"},{"line_number":412,"context_line":"        return True"},{"line_number":413,"context_line":"    if labels is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_07c72a66","line":410,"range":{"start_line":410,"start_character":0,"end_line":410,"end_character":37},"updated":"2020-11-10 08:18:54.000000000","message":"probably this functions requires some docstring.\n\nWhat does it mean labels \u003d None? Since in NPs (for the selectors) is is not the same None, than [], or than {} (https://github.com/openstack/kuryr-kubernetes/blob/master/doc/source/devref/network_policy.rst#network-policy-rule-definition)","commit_id":"4bfe85db0b3aa04360ae4b05d0a8ecf34f83853e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"59c4ab27464ce1cd8d9426c396a1c423849f1bf3","unresolved":false,"context_lines":[{"line_number":407,"context_line":"    return True"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"def match_selector(selector, labels):"},{"line_number":411,"context_line":"    if selector is None:"},{"line_number":412,"context_line":"        return True"},{"line_number":413,"context_line":"    if labels is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_a725960b","line":410,"range":{"start_line":410,"start_character":0,"end_line":410,"end_character":37},"in_reply_to":"1f621f24_07c72a66","updated":"2020-11-10 08:54:26.000000000","message":"`podSelector` is different than pod `labels`. Pod\u0027s metadata does not require `labels` to exist and we often fetch them using `pod[\u0027metadata\u0027].get(\u0027labels\u0027). So if pod has no labels at all we\u0027ll get None. The idea is that None effectively means empty dictionary {} of labels.","commit_id":"4bfe85db0b3aa04360ae4b05d0a8ecf34f83853e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"41eb494fea442e13aedf323ac50059ffcd2017d8","unresolved":false,"context_lines":[{"line_number":416,"context_line":"    crd_expressions \u003d selector.get(\u0027matchExpressions\u0027, None)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    match_exp \u003d match_lb \u003d True"},{"line_number":419,"context_line":"    if crd_expressions:"},{"line_number":420,"context_line":"        match_exp \u003d match_expressions(crd_expressions, labels)"},{"line_number":421,"context_line":"    if crd_labels:"},{"line_number":422,"context_line":"        match_lb \u003d match_labels(crd_labels, labels)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_67ad3e9a","line":419,"range":{"start_line":419,"start_character":0,"end_line":419,"end_character":23},"updated":"2020-11-10 08:18:54.000000000","message":"the default valus for labels does not affect crd_expressions?","commit_id":"4bfe85db0b3aa04360ae4b05d0a8ecf34f83853e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"59c4ab27464ce1cd8d9426c396a1c423849f1bf3","unresolved":false,"context_lines":[{"line_number":416,"context_line":"    crd_expressions \u003d selector.get(\u0027matchExpressions\u0027, None)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    match_exp \u003d match_lb \u003d True"},{"line_number":419,"context_line":"    if crd_expressions:"},{"line_number":420,"context_line":"        match_exp \u003d match_expressions(crd_expressions, labels)"},{"line_number":421,"context_line":"    if crd_labels:"},{"line_number":422,"context_line":"        match_lb \u003d match_labels(crd_labels, labels)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_277fc6e0","line":419,"range":{"start_line":419,"start_character":0,"end_line":419,"end_character":23},"in_reply_to":"1f621f24_67ad3e9a","updated":"2020-11-10 08:54:26.000000000","message":"It shouldn\u0027t, lines 395-398 will still get executed if pod has no labels at all.","commit_id":"4bfe85db0b3aa04360ae4b05d0a8ecf34f83853e"}]}
