)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"efa3cdfa1d7b458ec06971117ed727a0b54b846d","unresolved":true,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: I6d5bd444eab3b664dd794503ae052acdc2334992"},{"line_number":29,"context_line":"Signed-off-by: Callum Dickinson \u003ccallum.dickinson@catalystcloud.nz\u003e"},{"line_number":30,"context_line":"Story: 2011706"},{"line_number":31,"context_line":"Task: 53959"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"54a32938_089551dc","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":11},"updated":"2026-03-17 14:51:32.000000000","message":"Although storyboard is still active we decided to switch back to launchpad. So next time you can file a bug there instead.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"493766b7354f3b73bc4e80bb4dfe074eaa8c2e0e","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: I6d5bd444eab3b664dd794503ae052acdc2334992"},{"line_number":29,"context_line":"Signed-off-by: Callum Dickinson \u003ccallum.dickinson@catalystcloud.nz\u003e"},{"line_number":30,"context_line":"Story: 2011706"},{"line_number":31,"context_line":"Task: 53959"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7cfb91ea_7dbba785","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":11},"in_reply_to":"54a32938_089551dc","updated":"2026-03-17 18:23:14.000000000","message":"Ah, thanks for letting me know. I wasn\u0027t sure which one was the correct one since they both appear to have fairly old bugs in them.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"efa3cdfa1d7b458ec06971117ed727a0b54b846d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"031bc43b_df26fe7a","updated":"2026-03-17 14:51:32.000000000","message":"The overall idea looks good to me but I have one concern regarding the handling of user_id.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"5f59b09db6d9dadcc4b758e857feb99fb0b3f146","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"896bb779_a9f521d2","updated":"2026-03-15 22:36:19.000000000","message":"`https://releases.openstack.org/constraints/upper/master` seems to be inaccessible, hence the `grenade-ceilometer` test failure.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"a2586cf03be7fc02268270b80c2415196c26ad78","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"646bb415_3d7ab289","updated":"2026-03-16 08:09:22.000000000","message":"recheck releases.openstack.org outage","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"4717e562a0c4dac19a44a5b5b203cd1b2ab0ef9f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cbfedcf5_c59bc256","updated":"2026-03-16 06:58:24.000000000","message":"thank you, looks good to me.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"7cab01db58a9d200e02a121f929a8efebbe1824d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6c522af2_f734b2de","updated":"2026-03-30 21:35:44.000000000","message":"I\u0027m guessing it needs https://review.opendev.org/c/openstack/ceilometer/+/982632 to pass.","commit_id":"182fa300386efa8469cb43e3f82911a6fca34b3a"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"0c8d5d21743fb155ab246e530d430a20d18a38d3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9853dd69_aa35d067","updated":"2026-03-30 18:45:29.000000000","message":"recheck Gnocchi Internal Server Error, hopefully transient","commit_id":"182fa300386efa8469cb43e3f82911a6fca34b3a"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"99f5865f147f703e38696bbeb285f4107ead4fde","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ac50d0eb_2a3015d2","in_reply_to":"6c522af2_f734b2de","updated":"2026-03-31 03:26:58.000000000","message":"Yeah that should fix the failing grenade job.","commit_id":"182fa300386efa8469cb43e3f82911a6fca34b3a"}],"ceilometer/publisher/gnocchi.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"efa3cdfa1d7b458ec06971117ed727a0b54b846d","unresolved":true,"context_lines":[{"line_number":416,"context_line":"                # that resources that change ownership (e.g. transferred"},{"line_number":417,"context_line":"                # volumes) have the change reflected in Gnocchi."},{"line_number":418,"context_line":"                resource_metadata \u003d {\"project_id\": sample.project_id}"},{"line_number":419,"context_line":"                # NOTE(callumdickinson): Only set user_id if defined."},{"line_number":420,"context_line":"                # This avoids setting it to None when non-None in Gnocchi."},{"line_number":421,"context_line":"                if sample.user_id:"},{"line_number":422,"context_line":"                    resource_metadata[\"user_id\"] \u003d sample.user_id"},{"line_number":423,"context_line":"                resource_metadata.update(rd.sample_attributes(sample))"},{"line_number":424,"context_line":"                gnocchi_data[resource_id].setdefault("},{"line_number":425,"context_line":"                    \"resource_metadata\", {}).update(resource_metadata)"}],"source_content_type":"text/x-python","patch_set":2,"id":"655264e1_5e024951","line":422,"range":{"start_line":419,"start_character":0,"end_line":422,"end_character":65},"updated":"2026-03-17 14:51:32.000000000","message":"I wonder if this can cause undesired PATCH call when (1) A resource is created according to a sample with user_id and then (2) A measured is added according to a sample without user_id, (or vise versa) because _if_not_cached uses the whole resource_metadata to determine the cache ?","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"04bfa29c4b948c9d002824085c378447d921e825","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                # that resources that change ownership (e.g. transferred"},{"line_number":417,"context_line":"                # volumes) have the change reflected in Gnocchi."},{"line_number":418,"context_line":"                resource_metadata \u003d {\"project_id\": sample.project_id}"},{"line_number":419,"context_line":"                # NOTE(callumdickinson): Only set user_id if defined."},{"line_number":420,"context_line":"                # This avoids setting it to None when non-None in Gnocchi."},{"line_number":421,"context_line":"                if sample.user_id:"},{"line_number":422,"context_line":"                    resource_metadata[\"user_id\"] \u003d sample.user_id"},{"line_number":423,"context_line":"                resource_metadata.update(rd.sample_attributes(sample))"},{"line_number":424,"context_line":"                gnocchi_data[resource_id].setdefault("},{"line_number":425,"context_line":"                    \"resource_metadata\", {}).update(resource_metadata)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c63c3a00_5e7a066b","line":422,"range":{"start_line":419,"start_character":0,"end_line":422,"end_character":65},"in_reply_to":"1f7c8a04_ee17dae2","updated":"2026-03-31 20:08:31.000000000","message":"Based on Takashi\u0027s approval, marking this discussion as resolved.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"8386f50a0e07a2d6e7ba9a1dcd84e90d5badb9d9","unresolved":true,"context_lines":[{"line_number":416,"context_line":"                # that resources that change ownership (e.g. transferred"},{"line_number":417,"context_line":"                # volumes) have the change reflected in Gnocchi."},{"line_number":418,"context_line":"                resource_metadata \u003d {\"project_id\": sample.project_id}"},{"line_number":419,"context_line":"                # NOTE(callumdickinson): Only set user_id if defined."},{"line_number":420,"context_line":"                # This avoids setting it to None when non-None in Gnocchi."},{"line_number":421,"context_line":"                if sample.user_id:"},{"line_number":422,"context_line":"                    resource_metadata[\"user_id\"] \u003d sample.user_id"},{"line_number":423,"context_line":"                resource_metadata.update(rd.sample_attributes(sample))"},{"line_number":424,"context_line":"                gnocchi_data[resource_id].setdefault("},{"line_number":425,"context_line":"                    \"resource_metadata\", {}).update(resource_metadata)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f7c8a04_ee17dae2","line":422,"range":{"start_line":419,"start_character":0,"end_line":422,"end_character":65},"in_reply_to":"48cf26ab_d75b74c9","updated":"2026-03-17 18:49:46.000000000","message":"Based on Takashi\u0027s feedback and my investigation of the options above, I have opted to revert the change for `user_id` and only update `project_id`. I have put my reasoning in comments and in the commit message.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"493766b7354f3b73bc4e80bb4dfe074eaa8c2e0e","unresolved":true,"context_lines":[{"line_number":416,"context_line":"                # that resources that change ownership (e.g. transferred"},{"line_number":417,"context_line":"                # volumes) have the change reflected in Gnocchi."},{"line_number":418,"context_line":"                resource_metadata \u003d {\"project_id\": sample.project_id}"},{"line_number":419,"context_line":"                # NOTE(callumdickinson): Only set user_id if defined."},{"line_number":420,"context_line":"                # This avoids setting it to None when non-None in Gnocchi."},{"line_number":421,"context_line":"                if sample.user_id:"},{"line_number":422,"context_line":"                    resource_metadata[\"user_id\"] \u003d sample.user_id"},{"line_number":423,"context_line":"                resource_metadata.update(rd.sample_attributes(sample))"},{"line_number":424,"context_line":"                gnocchi_data[resource_id].setdefault("},{"line_number":425,"context_line":"                    \"resource_metadata\", {}).update(resource_metadata)"}],"source_content_type":"text/x-python","patch_set":2,"id":"48cf26ab_d75b74c9","line":422,"range":{"start_line":419,"start_character":0,"end_line":422,"end_character":65},"in_reply_to":"655264e1_5e024951","updated":"2026-03-17 18:23:14.000000000","message":"Yes, I think this is possible. Ideally all samples for a certain metric would always contain `user_id` or not, but I don\u0027t think this is the case for many metrics, and it would be ideal to not have to introduce this restriction at this point (especially for an attribute that I do not think is particularly useful or accurate).\n\nI think we have two options here:\n\n1. Use two separate cache values - one for samples with `user_id` set, and another without `user_id` set. That way resources will only be updated if *either* of them are actually updated. This will still cause duplicate updates, but only once per actual metadata update as opposed to the \"flapping\" behaviour you have identified.\n1. Maintain the existing behaviour for `user_id`, and do not update it after the resource has been created in Gnocchi.\n\nDo you have any opinions on which one is better? I\u0027m thinking both have value here. As I said earlier, `user_id` itself does not have a lot of value in the context of Ceilometer since it can change fairly unpredictably, so I think there may be value in *not* updating it in this case.","commit_id":"6cf0b79398fdabae788922f59d53f256febfed39"}]}
