)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"376f9ac4cfc5f31e9296b3f4431d02597c4db0f1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The legacy instance.exists notification includes the full url of the glance"},{"line_number":10,"context_line":"image of the given instance. But the versioned notification only includes"},{"line_number":11,"context_line":"the image uuid. Generating the full url can be a costly operation as it"},{"line_number":12,"context_line":"needs to talk to Keyston."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"So this patch makes sure that generate_image_url only called when the"},{"line_number":15,"context_line":"generated information will be used."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f6a8fd7_729e8755","line":12,"range":{"start_line":12,"start_character":17,"end_line":12,"end_character":24},"updated":"2018-04-27 08:50:28.000000000","message":"nit Keystone","commit_id":"88103a816d9b9a959c755dda263428bf50685835"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4ea5c271491275ac3b76a15802e0911f078ca8e2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The legacy instance.exists notification includes the full url of the glance"},{"line_number":10,"context_line":"image of the given instance. But the versioned notification only includes"},{"line_number":11,"context_line":"the image uuid. Generating the full url can be a costly operation as it"},{"line_number":12,"context_line":"needs to talk to Keyston."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"So this patch makes sure that generate_image_url only called when the"},{"line_number":15,"context_line":"generated information will be used."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_5ec1b74d","line":12,"range":{"start_line":12,"start_character":17,"end_line":12,"end_character":24},"in_reply_to":"9f6a8fd7_729e8755","updated":"2018-07-03 11:52:03.000000000","message":"Done","commit_id":"88103a816d9b9a959c755dda263428bf50685835"}],"nova/notifications/base.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11134b57c9f35b72081757254035cfcb0fb6d055","unresolved":false,"context_lines":[{"line_number":388,"context_line":"    :param:network_info: network_info provided if not None"},{"line_number":389,"context_line":"    \"\"\""},{"line_number":390,"context_line":"    try:"},{"line_number":391,"context_line":"        # NOTE(gibi): The image_ref_url only used in unversioned notifications."},{"line_number":392,"context_line":"        # Calling the generate_image_url() could be costly as it might calls"},{"line_number":393,"context_line":"        # the Keystone API. So only do the call if the actual value will be"},{"line_number":394,"context_line":"        # used."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8e3421fd","line":391,"range":{"start_line":391,"start_character":40,"end_line":391,"end_character":49},"updated":"2018-05-08 15:07:12.000000000","message":"is only used","commit_id":"88103a816d9b9a959c755dda263428bf50685835"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"573bb6af670a2e1a5c28f1628e538c4b7cf128f0","unresolved":false,"context_lines":[{"line_number":388,"context_line":"    :param:network_info: network_info provided if not None"},{"line_number":389,"context_line":"    \"\"\""},{"line_number":390,"context_line":"    try:"},{"line_number":391,"context_line":"        # NOTE(gibi): The image_ref_url only used in unversioned notifications."},{"line_number":392,"context_line":"        # Calling the generate_image_url() could be costly as it might calls"},{"line_number":393,"context_line":"        # the Keystone API. So only do the call if the actual value will be"},{"line_number":394,"context_line":"        # used."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_3e471b4f","line":391,"range":{"start_line":391,"start_character":40,"end_line":391,"end_character":49},"in_reply_to":"5f7c97a3_8e3421fd","updated":"2018-07-03 11:51:29.000000000","message":"Done","commit_id":"88103a816d9b9a959c755dda263428bf50685835"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"11134b57c9f35b72081757254035cfcb0fb6d055","unresolved":false,"context_lines":[{"line_number":389,"context_line":"    \"\"\""},{"line_number":390,"context_line":"    try:"},{"line_number":391,"context_line":"        # NOTE(gibi): The image_ref_url only used in unversioned notifications."},{"line_number":392,"context_line":"        # Calling the generate_image_url() could be costly as it might calls"},{"line_number":393,"context_line":"        # the Keystone API. So only do the call if the actual value will be"},{"line_number":394,"context_line":"        # used."},{"line_number":395,"context_line":"        if CONF.notifications.notification_format in (\u0027both\u0027, \u0027unversioned\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_4e3e09db","line":392,"range":{"start_line":392,"start_character":65,"end_line":392,"end_character":70},"updated":"2018-05-08 15:07:12.000000000","message":"strike","commit_id":"88103a816d9b9a959c755dda263428bf50685835"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"573bb6af670a2e1a5c28f1628e538c4b7cf128f0","unresolved":false,"context_lines":[{"line_number":389,"context_line":"    \"\"\""},{"line_number":390,"context_line":"    try:"},{"line_number":391,"context_line":"        # NOTE(gibi): The image_ref_url only used in unversioned notifications."},{"line_number":392,"context_line":"        # Calling the generate_image_url() could be costly as it might calls"},{"line_number":393,"context_line":"        # the Keystone API. So only do the call if the actual value will be"},{"line_number":394,"context_line":"        # used."},{"line_number":395,"context_line":"        if CONF.notifications.notification_format in (\u0027both\u0027, \u0027unversioned\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_fe7203b0","line":392,"range":{"start_line":392,"start_character":65,"end_line":392,"end_character":70},"in_reply_to":"5f7c97a3_4e3e09db","updated":"2018-07-03 11:51:29.000000000","message":"Done","commit_id":"88103a816d9b9a959c755dda263428bf50685835"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d2cca380ce261b9d17ac45ed63737ccf001a236","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    notifications."},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    :param:instance: nova.objects.Instance"},{"line_number":359,"context_line":"    :param:network_info: network_info provided if not None"},{"line_number":360,"context_line":"    \"\"\""},{"line_number":361,"context_line":"    try:"},{"line_number":362,"context_line":"        if populate_image_ref_url:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_8599ce1e","line":359,"updated":"2018-07-09 22:10:23.000000000","message":"nit: adding the docstring param here would be nice","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8455c72679ff52f493514f09838ef97d0cdabc31","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    notifications."},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    :param:instance: nova.objects.Instance"},{"line_number":359,"context_line":"    :param:network_info: network_info provided if not None"},{"line_number":360,"context_line":"    \"\"\""},{"line_number":361,"context_line":"    try:"},{"line_number":362,"context_line":"        if populate_image_ref_url:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d8a63fc1","line":359,"in_reply_to":"5f7c97a3_8599ce1e","updated":"2018-07-16 14:13:21.000000000","message":"Done","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d2cca380ce261b9d17ac45ed63737ccf001a236","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    try:"},{"line_number":362,"context_line":"        if populate_image_ref_url:"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            # TODO(mriedem): We can eventually drop this when we no longer"},{"line_number":365,"context_line":"            # support"},{"line_number":366,"context_line":"            # legacy notifications since versioned notifications don\u0027t use"},{"line_number":367,"context_line":"            # this."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_658272a7","line":364,"range":{"start_line":364,"start_character":14,"end_line":364,"end_character":18},"updated":"2018-07-09 22:10:23.000000000","message":"Maybe change this to a NOTE now.","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8455c72679ff52f493514f09838ef97d0cdabc31","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    try:"},{"line_number":362,"context_line":"        if populate_image_ref_url:"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"            # TODO(mriedem): We can eventually drop this when we no longer"},{"line_number":365,"context_line":"            # support"},{"line_number":366,"context_line":"            # legacy notifications since versioned notifications don\u0027t use"},{"line_number":367,"context_line":"            # this."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_189d976b","line":364,"range":{"start_line":364,"start_character":14,"end_line":364,"end_character":18},"in_reply_to":"5f7c97a3_658272a7","updated":"2018-07-16 14:13:21.000000000","message":"Done","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d2cca380ce261b9d17ac45ed63737ccf001a236","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            image_ref_url \u003d image_api.API().generate_image_url("},{"line_number":369,"context_line":"                instance.image_ref, context)"},{"line_number":370,"context_line":"        else:"},{"line_number":371,"context_line":"            image_ref_url \u003d None"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    except ks_exc.EndpointNotFound:"},{"line_number":374,"context_line":"        # We might be running from a periodic task with no auth token and"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_2588fac0","line":371,"range":{"start_line":371,"start_character":12,"end_line":371,"end_character":32},"updated":"2018-07-09 22:10:23.000000000","message":"This is a behavior change isn\u0027t it? If we\u0027d hit a failure talking to keystone, on L380 we\u0027d set it to the instance.image_ref, so why don\u0027t we just do that here? I guess if the versioned notification payloads never use that value from the returned dict then it\u0027s not an issue.","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8455c72679ff52f493514f09838ef97d0cdabc31","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            image_ref_url \u003d image_api.API().generate_image_url("},{"line_number":369,"context_line":"                instance.image_ref, context)"},{"line_number":370,"context_line":"        else:"},{"line_number":371,"context_line":"            image_ref_url \u003d None"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    except ks_exc.EndpointNotFound:"},{"line_number":374,"context_line":"        # We might be running from a periodic task with no auth token and"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d8ee3f20","line":371,"range":{"start_line":371,"start_character":12,"end_line":371,"end_character":32},"in_reply_to":"5f7c97a3_2588fac0","updated":"2018-07-16 14:13:21.000000000","message":"populate_image_ref_url is False if and only if we are sending out versioned notifications only. As the versioned notification does not use this field it doesn\u0027t matter how we set it but I have to set it as it is used at L430 below. \n\nI changed the control structure to make the intention clearer.","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8c60fbac8c35fc1cc3c4ea32c4707eeb190d91f","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    if old_display_name:"},{"line_number":202,"context_line":"        payload[\"old_display_name\"] \u003d old_display_name"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    rpc.get_notifier(service, host).info(context,"},{"line_number":205,"context_line":"                                         \u0027compute.instance.update\u0027, payload)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    _send_versioned_instance_update(context, instance, payload, host, service)"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3c4f076b","line":205,"range":{"start_line":204,"start_character":4,"end_line":205,"end_character":76},"updated":"2018-07-17 13:59:35.000000000","message":"Don\u0027t we always end up sending the unversioned notification here regardless of CONF.notifications.notification_format?\n\n(later)\n\nI guess if we aren\u0027t using legacy unversioned notifications we\u0027ll use the noop notification driver:\n\nhttps://github.com/openstack/nova/blob/559ab334939317d329b9bf2f49aa06538f16b96a/nova/rpc.py#L84\n\nhttps://github.com/openstack/nova/blob/559ab334939317d329b9bf2f49aa06538f16b96a/nova/rpc.py#L211\n\nSo nevermind my comment above.","commit_id":"ac7e53146bc41d3356717260c643fd0ef4d5e5ef"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8c60fbac8c35fc1cc3c4ea32c4707eeb190d91f","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    :param:instance: nova.objects.Instance"},{"line_number":359,"context_line":"    :param:network_info: network_info provided if not None"},{"line_number":360,"context_line":"    :param:populate_image_ref_url: If yes then the full URL of the image of the"},{"line_number":361,"context_line":"                                   instance is generated and returned. This,"},{"line_number":362,"context_line":"                                   depending on the configuration, might mean a"},{"line_number":363,"context_line":"                                   call to Keystone. If false, None value is"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3c862767","line":360,"range":{"start_line":360,"start_character":38,"end_line":360,"end_character":41},"updated":"2018-07-17 13:59:35.000000000","message":"True","commit_id":"ac7e53146bc41d3356717260c643fd0ef4d5e5ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f974bc0f9d5351d17bcce4e69e930f2ed6b015f8","unresolved":false,"context_lines":[{"line_number":367,"context_line":"    image_ref_url \u003d None"},{"line_number":368,"context_line":"    if populate_image_ref_url:"},{"line_number":369,"context_line":"        try:"},{"line_number":370,"context_line":"            # NOTE(mriedem): We can eventually drop this when we no longer"},{"line_number":371,"context_line":"            # support"},{"line_number":372,"context_line":"            # legacy notifications since versioned notifications don\u0027t use"},{"line_number":373,"context_line":"            # this."},{"line_number":374,"context_line":"            image_ref_url \u003d image_api.API().generate_image_url("},{"line_number":375,"context_line":"                instance.image_ref, context)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        except ks_exc.EndpointNotFound:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_049d2e6b","line":374,"range":{"start_line":370,"start_character":0,"end_line":374,"end_character":1},"updated":"2018-07-16 16:06:16.000000000","message":"This is formatted weirdly. But not part of this patch.","commit_id":"ac7e53146bc41d3356717260c643fd0ef4d5e5ef"}],"nova/tests/unit/notifications/test_base.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d2cca380ce261b9d17ac45ed63737ccf001a236","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                          populate_image_ref_url\u003dTrue)"},{"line_number":122,"context_line":"        mock_gen_image_url.assert_called_once_with(instance.image_ref, ctxt)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @mock.patch(\u0027nova.image.api.API.generate_image_url\u0027)"},{"line_number":125,"context_line":"    def test_info_from_instance_not_call_generate_image_url("},{"line_number":126,"context_line":"            self, mock_gen_image_url):"},{"line_number":127,"context_line":"        ctxt \u003d nova_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_25a1da3a","line":124,"updated":"2018-07-09 22:10:23.000000000","message":"Could also use new_callable\u003dmock.NonCallableMock for this, but I know it confuses some people.","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8455c72679ff52f493514f09838ef97d0cdabc31","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                          populate_image_ref_url\u003dTrue)"},{"line_number":122,"context_line":"        mock_gen_image_url.assert_called_once_with(instance.image_ref, ctxt)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @mock.patch(\u0027nova.image.api.API.generate_image_url\u0027)"},{"line_number":125,"context_line":"    def test_info_from_instance_not_call_generate_image_url("},{"line_number":126,"context_line":"            self, mock_gen_image_url):"},{"line_number":127,"context_line":"        ctxt \u003d nova_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_389413e7","line":124,"in_reply_to":"5f7c97a3_25a1da3a","updated":"2018-07-16 14:13:21.000000000","message":"including me. I prefer the bit more explicit assert_not_called() check at the end.","commit_id":"cb4af33f057d57536f13bf85305cbcd22e53b79f"}]}
