)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d5d971702d19599a74b59a4daff72a1cf5392c83","unresolved":true,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"[1] https://docs.openstack.org/api-ref/resource-optimization/#audits"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #2110538"},{"line_number":21,"context_line":"Change-Id: I23232b3b54421839bb01d54386d4e7b244f4e2a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"4746d655_ef27cf9b","line":20,"updated":"2025-05-14 11:44:23.000000000","message":"so general comment\n\nwhen fixing a bug its prefered if you do it in two patches\n\nthe first patch shoudl add a test to repoduce the bug in this case showign that today it will return a 500 and then the second patch that fixes it updates the test and fixes the code to return the correct responce.\n\nwould you mind doing that and adding a \"fixes\" release note.\n\nwhile not all patches need a release note most patches\nthat have Close-Bug or complete a feature should have one.\n\nand all pathces that have any kind of upgrade imapact shoudl have one too so \nthis change ideally shoudl have a fixes release note.\n\nim not sure if you are familar with using reno to generate them?\n\nyou can do it with `tox -e venv -- reno new \u003crelease-note-name-here\u003e`","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"bc5a3a9e494a21f77b7d9cd8dd9b205db278543a","unresolved":true,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"[1] https://docs.openstack.org/api-ref/resource-optimization/#audits"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #2110538"},{"line_number":21,"context_line":"Change-Id: I23232b3b54421839bb01d54386d4e7b244f4e2a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"67789e66_7538e7fb","line":20,"in_reply_to":"4746d655_ef27cf9b","updated":"2025-05-14 14:18:28.000000000","message":"thanks, I will do it","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1e259e8803284b22000e35d027b53f711a5f0b67","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"[1] https://docs.openstack.org/api-ref/resource-optimization/#audits"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #2110538"},{"line_number":21,"context_line":"Change-Id: I23232b3b54421839bb01d54386d4e7b244f4e2a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1046078a_bba150f8","line":20,"in_reply_to":"67789e66_7538e7fb","updated":"2025-05-16 07:42:38.000000000","message":"Done","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d5d971702d19599a74b59a4daff72a1cf5392c83","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"feb86b05_f5e88f44","updated":"2025-05-14 11:44:23.000000000","message":"the fix looks reasonable to me","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"48c22ef02291b3459e531c89656a70b58ee430c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5115664c_bc21b996","updated":"2025-05-27 18:35:04.000000000","message":"LGTM, thanks Alfredo","commit_id":"4629402f384601778c9583807518214764da2804"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"36eb4c84d6e22edda25b4001def014e91efbc0d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a4dddf5b_9b68ad1b","updated":"2025-05-22 11:56:03.000000000","message":"is it possible to add a tempest api test to check the status code?","commit_id":"4629402f384601778c9583807518214764da2804"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"0a948991017cb4484aa044043deae9c7d661254d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"92a1b78b_96b40a48","updated":"2025-05-20 11:22:02.000000000","message":"lgtm, thanks Alfredo, I tested manually in a devstack deployment and creating an audit with wrong parameters returns indeed a 400 now, with an informative error\n\n```\n(venv) ubuntu@jgilaber-watcher-1:/opt/stack/watcher$ openstack optimize audit create -a zm_test -p storage_pools\u003d\u0027[{\"src_pool\": \"jgilaber-watcher-1@lvmdriver-1#lvmdriver-1\", \"src_type\": \"lvmdriver-1\", \"dst_type\": \"lvmdriver-1\"}]\u0027  \nInvalid parameters for strategy: \u0027dst_pool\u0027 is a required property\n\nFailed validating \u0027required\u0027 in schema[\u0027properties\u0027][\u0027storage_pools\u0027][\u0027items\u0027]:\n    {\u0027type\u0027: \u0027object\u0027,\n     \u0027properties\u0027: {\u0027src_pool\u0027: {\u0027description\u0027: \u0027Storage pool from which \u0027\n                                                \u0027volumes migrate\u0027,\n                                 \u0027type\u0027: \u0027string\u0027},\n                    \u0027dst_pool\u0027: {\u0027description\u0027: \u0027Storage pool to which \u0027\n                                                \u0027volumes migrate\u0027,\n                                 \u0027type\u0027: \u0027string\u0027},\n                    \u0027src_type\u0027: {\u0027description\u0027: \u0027Volume type from which \u0027\n                                                \u0027volumes migrate\u0027,\n                                 \u0027type\u0027: \u0027string\u0027},\n                    \u0027dst_type\u0027: {\u0027description\u0027: \u0027Volume type to which \u0027\n                                                \u0027volumes migrate\u0027,\n                                 \u0027type\u0027: \u0027string\u0027}},\n     \u0027required\u0027: [\u0027src_pool\u0027, \u0027src_type\u0027, \u0027dst_type\u0027, \u0027dst_pool\u0027],\n     \u0027additionalProperties\u0027: False}\n\nOn instance[\u0027storage_pools\u0027][0]:\n    {\u0027src_pool\u0027: \u0027jgilaber-watcher-1@lvmdriver-1#lvmdriver-1\u0027,\n     \u0027src_type\u0027: \u0027lvmdriver-1\u0027,\n     \u0027dst_type\u0027: \u0027lvmdriver-1\u0027} (HTTP 400)\n```","commit_id":"4629402f384601778c9583807518214764da2804"}],"releasenotes/notes/return-error-400-on-bad-parameters-bb964e4f5cadc15c.yaml":[{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"834e892e2231189e88895acdf1e5d2d8cfa70273","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Corrected the HTTP error code returned when watcher users try to create"},{"line_number":5,"context_line":"    audits with invalid parameters. The API now correctly returns a 400 Bad"},{"line_number":6,"context_line":"    Request error."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"4d6c1047_69cdba74","line":4,"updated":"2025-05-15 13:55:42.000000000","message":"something that I noticed in the release notes, sometimes we link the bugs, sometimes we don\u0027t, like in https://docs.openstack.org/releasenotes/watcher/2025.1.html#relnotes-14-0-0-stable-2025-1. Is there some standard approach here?","commit_id":"693676fd4e962b611c653252659cfa4d57566e69"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"6ce0e2476a84958ba48dcf7d88832d340dd9bdf5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Corrected the HTTP error code returned when watcher users try to create"},{"line_number":5,"context_line":"    audits with invalid parameters. The API now correctly returns a 400 Bad"},{"line_number":6,"context_line":"    Request error."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"2ab31554_601fe3b3","line":4,"in_reply_to":"20bd2c53_7882a8a3","updated":"2025-05-16 07:42:06.000000000","message":"Done","commit_id":"693676fd4e962b611c653252659cfa4d57566e69"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"640df414c56ba951cd40520930fc5bd5e34c6904","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Corrected the HTTP error code returned when watcher users try to create"},{"line_number":5,"context_line":"    audits with invalid parameters. The API now correctly returns a 400 Bad"},{"line_number":6,"context_line":"    Request error."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"20bd2c53_7882a8a3","line":4,"in_reply_to":"4d6c1047_69cdba74","updated":"2025-05-16 07:31:16.000000000","message":"yep, I see adding the bug link is in contributor\u0027s guide for other projects and seems a good practice for me. i will update it. https://docs.openstack.org/cinder/latest/contributor/releasenotes.html#bugs","commit_id":"693676fd4e962b611c653252659cfa4d57566e69"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"55ef54dc8811d96896f8ff692a87e1365e14bb51","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #2110538 \u003chttps://bugs.launchpad.net/watcher/+bug/2110538\u003e`_:"},{"line_number":5,"context_line":"    Corrected the HTTP error code returned when watcher users try to create"},{"line_number":6,"context_line":"    audits with invalid parameters. The API now correctly returns a 400 Bad"},{"line_number":7,"context_line":"    Request error."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"2b706b41_618d2287","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":70},"updated":"2025-05-26 15:57:24.000000000","message":"nit i would prefer if  you never lead with the URL.\n\nit should Alway be one of the last things in the release note\nas the reader shoudl generaly not need to click on it.\n\nif they need to click on it and read it to understand the issue it generally means the release not is missign detail.","commit_id":"4629402f384601778c9583807518214764da2804"}],"watcher/api/controllers/v1/audit.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d5d971702d19599a74b59a4daff72a1cf5392c83","unresolved":true,"context_lines":[{"line_number":629,"context_line":"                # validate input parameter with default value feedback"},{"line_number":630,"context_line":"                no_schema \u003d False"},{"line_number":631,"context_line":"                try:"},{"line_number":632,"context_line":"                    utils.StrictDefaultValidatingDraft4Validator("},{"line_number":633,"context_line":"                        schema).validate(audit.parameters)"},{"line_number":634,"context_line":"                except jsonschema.exceptions.ValidationError as e:"},{"line_number":635,"context_line":"                    raise exception.Invalid("}],"source_content_type":"text/x-python","patch_set":1,"id":"218ec81c_0efe606a","line":632,"range":{"start_line":632,"start_character":26,"end_line":632,"end_character":64},"updated":"2025-05-14 11:44:23.000000000","message":"fyi: sigh ok this is fine but we need to add this to the techdebth list\n\nthis is a very old draft, we will need to migrate our schemas to a more modern version when we start working on providign OPENAPI schemas.\n\nthere is noting fo you to do about it in this change it just tech debt we shoudl eventually adress.","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1e259e8803284b22000e35d027b53f711a5f0b67","unresolved":false,"context_lines":[{"line_number":629,"context_line":"                # validate input parameter with default value feedback"},{"line_number":630,"context_line":"                no_schema \u003d False"},{"line_number":631,"context_line":"                try:"},{"line_number":632,"context_line":"                    utils.StrictDefaultValidatingDraft4Validator("},{"line_number":633,"context_line":"                        schema).validate(audit.parameters)"},{"line_number":634,"context_line":"                except jsonschema.exceptions.ValidationError as e:"},{"line_number":635,"context_line":"                    raise exception.Invalid("}],"source_content_type":"text/x-python","patch_set":1,"id":"b9bfa200_57db1c99","line":632,"range":{"start_line":632,"start_character":26,"end_line":632,"end_character":64},"in_reply_to":"218ec81c_0efe606a","updated":"2025-05-16 07:42:38.000000000","message":"ack","commit_id":"c6af39cb8829df4b94e2789e0a1f9d0e6f1c9855"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"834e892e2231189e88895acdf1e5d2d8cfa70273","unresolved":true,"context_lines":[{"line_number":632,"context_line":"                    utils.StrictDefaultValidatingDraft4Validator("},{"line_number":633,"context_line":"                        schema).validate(audit.parameters)"},{"line_number":634,"context_line":"                except jsonschema.exceptions.ValidationError as e:"},{"line_number":635,"context_line":"                    raise exception.Invalid("},{"line_number":636,"context_line":"                        _(\u0027Invalid parameters for strategy: %s\u0027) % e)"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        if no_schema and audit.parameters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"395c6681_f3fa05a4","line":635,"updated":"2025-05-15 13:55:42.000000000","message":"+1 this will make errors much clearer","commit_id":"693676fd4e962b611c653252659cfa4d57566e69"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1e259e8803284b22000e35d027b53f711a5f0b67","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                    utils.StrictDefaultValidatingDraft4Validator("},{"line_number":633,"context_line":"                        schema).validate(audit.parameters)"},{"line_number":634,"context_line":"                except jsonschema.exceptions.ValidationError as e:"},{"line_number":635,"context_line":"                    raise exception.Invalid("},{"line_number":636,"context_line":"                        _(\u0027Invalid parameters for strategy: %s\u0027) % e)"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"        if no_schema and audit.parameters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ac5985fc_bc287c77","line":635,"in_reply_to":"395c6681_f3fa05a4","updated":"2025-05-16 07:42:38.000000000","message":"Done","commit_id":"693676fd4e962b611c653252659cfa4d57566e69"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eeec187eb32ca253633870c5e1a44404bed80e4e","unresolved":true,"context_lines":[{"line_number":629,"context_line":"                # validate input parameter with default value feedback"},{"line_number":630,"context_line":"                no_schema \u003d False"},{"line_number":631,"context_line":"                try:"},{"line_number":632,"context_line":"                    utils.StrictDefaultValidatingDraft4Validator("},{"line_number":633,"context_line":"                        schema).validate(audit.parameters)"},{"line_number":634,"context_line":"                except jsonschema.exceptions.ValidationError as e:"},{"line_number":635,"context_line":"                    raise exception.Invalid("}],"source_content_type":"text/x-python","patch_set":3,"id":"24af40f1_4f8b0530","line":632,"range":{"start_line":632,"start_character":26,"end_line":632,"end_character":64},"updated":"2025-05-26 15:59:59.000000000","message":"one other way to fix this would be to have this catch teh jsonschema.exceptions.ValidationError itnernally and return a watcher specific excption instead.\n\ni think the current case is fine but in general we shoudl not allow excptions for libs to escale the funtion that faised them and should convert them to a wtacher specific one instead.","commit_id":"4629402f384601778c9583807518214764da2804"}]}
