)]}'
{"id":"openstack%2Fmistral~1009484","triplet_id":"openstack%2Fmistral~stable%2F2026.1~I02ff0eb095ea653ae0e201058547befe8c4d6ea1","project":"openstack/mistral","branch":"stable/2026.1","topic":"mistral-OSSA-2026-044","hashtags":[],"change_id":"I02ff0eb095ea653ae0e201058547befe8c4d6ea1","subject":"Fix create-or-update of definitions hijacking other projects\u0027 rows","status":"MERGED","created":"2026-10-08 14:14:04.000000000","updated":"2026-10-08 19:03:40.000000000","submitted":"2026-10-08 19:01:31.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"1009484-mistral-OSSA-2026-044","meta_rev_id":"30a278bae610abcf0993f5a88fb1023c4c06e0ab","_number":1009484,"virtual_id_number":1009484,"owner":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"tag":"autogenerated:zuul:gate","value":2,"date":"2026-10-08 19:01:31.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"all":[{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":2,"date":"2026-10-08 17:44:09.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"all":[{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":1,"date":"2026-10-08 17:44:09.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2026-10-08 15:44:54.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"23923b87d7b651ff10d16f08187e80a7e072dc2c","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"date":"2026-10-08 14:14:04.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"c7095af44064e5db198a8dac2888443c96aa4a48","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-10-08 15:44:54.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/92b2e6d5ed2542a7a10056731193c821\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/9828ec07e4604f22abb760642242675a : SUCCESS in 4m 36s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/28a6c0085245454d8667a1b9341c5e19 : SUCCESS in 12m 25s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/c5438f091dac47c7a3855082e56a7fbe : SUCCESS in 10m 38s\n- openstack-tox-py314 https://zuul.opendev.org/t/openstack/build/b726eae16ca44ff195af99c0f8dc38ee : SUCCESS in 15m 34s (non-voting)\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/b33ac311b99541a1b8828db1217740fb : SUCCESS in 5m 33s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/e9057c49910d46fb97acba7c99448a29 : SUCCESS in 4m 48s\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/6c9188d39999442da5a8d1eef67dc6bc : SUCCESS in 12m 32s (non-voting)\n- mistral-devstack https://zuul.opendev.org/t/openstack/build/215e4abdceaf4ece9e1207a97ddb1a8c : SUCCESS in 42m 50s\n- mistral-devstack-tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/fac39bb653b64a3bb67d4e99d0d9727a : SUCCESS in 40m 58s","accounts_in_message":[],"_revision_number":1},{"id":"2cf610292d5361e9f5e44e0df305722688517d9b","author":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"date":"2026-10-08 17:44:09.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"39dc3d34aaad886d69ad1f0d3c238d6f7e9972cd","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-10-08 17:47:08.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"481e951ab8827ff41bcfe77dab0d0cdf8a51da8c","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-10-08 19:01:31.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/ff9cbf441b724fcdbbc573e7313750b9\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/1d92a6b707df44e0a7aa4a0295b0832f : SUCCESS in 4m 15s\n- openstack-tox-py310 https://zuul.opendev.org/t/openstack/build/14e5d880fa444c62a3e08bd4e65834a5 : SUCCESS in 11m 12s\n- openstack-tox-py313 https://zuul.opendev.org/t/openstack/build/f883983d64134b26bab0e47d17239b99 : SUCCESS in 10m 40s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/64a5b34106644bb4ba7adbcea7f9aeb4 : SUCCESS in 9m 41s\n- build-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/e7e515417d854aa4b438234331281fe3 : SUCCESS in 5m 04s\n- mistral-devstack https://zuul.opendev.org/t/openstack/build/24f92211450641a4853b4ff32a670082 : SUCCESS in 40m 49s\n- mistral-devstack-tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/5c4415263a174ca893a8e08865c6f416 : SUCCESS in 42m 39s","accounts_in_message":[],"_revision_number":1},{"id":"508de09f08bce1426ca901186450e2ab7f8c0583","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-10-08 19:01:31.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"30a278bae610abcf0993f5a88fb1023c4c06e0ab","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2026-10-08 19:03:40.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/4e9bbb2df0864bcda7905389b46cb306\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/b17c8a9700434816ac4ea43327f0bc64 : SUCCESS in 46s\n- promote-openstack-releasenotes https://zuul.opendev.org/t/openstack/build/e44f0ad891e5448ebcd41a69ee9fbe35 : SUCCESS in 43s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"17faa8157cf332e76002c43c1fca6bdf130b48d3","revisions":{"17faa8157cf332e76002c43c1fca6bdf130b48d3":{"kind":"REWORK","_number":1,"created":"2026-10-08 14:14:04.000000000","uploader":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"},"ref":"refs/changes/84/1009484/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/mistral","ref":"refs/changes/84/1009484/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/mistral refs/changes/84/1009484/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/mistral refs/changes/84/1009484/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/mistral refs/changes/84/1009484/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/mistral refs/changes/84/1009484/1"}}},"commit":{"parents":[{"commit":"9cc0d42ac708b5835c2047eb1f9ecbf974ac6f67","subject":"Cleanup dynamic actions and code sources","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/mistral/commit/9cc0d42ac708b5835c2047eb1f9ecbf974ac6f67"}]}],"author":{"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","date":"2026-07-09 19:16:53.000000000","tz":120},"committer":{"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","date":"2026-10-08 14:13:47.000000000","tz":120},"subject":"Fix create-or-update of definitions hijacking other projects\u0027 rows","message":"Fix create-or-update of definitions hijacking other projects\u0027 rows\n\nWhen several projects have a workflow or ad-hoc action definition with\nthe same name, create_or_update_workflow_definition() and\ncreate_or_update_action_definition() looked the existing object up with\nan unordered first() over a query that isn\u0027t scoped to a single project\n(admin requests see all projects). The lookup could therefore return\nanother project\u0027s definition, and since project_id is always rewritten\nto the current project on write (see\nmodel_base.register_secure_model_hooks), updating that object moved it\ninto the caller\u0027s project. If the caller\u0027s project already had its own\ndefinition with that name, the move violated the (name, namespace,\nproject_id) unique constraint and the resulting DBDuplicateEntry was\nraised at commit time, surfacing as an HTTP 500.\n\nThis intermittently broke the python-mistralclient functional job:\nthe tests leaked \u0027wb.ac1\u0027 action definitions in two projects, after\nwhich every \u0027workbook-create\u0027 of a definition containing actions failed\nwith a 500, depending on which project\u0027s row the DB returned first.\n\nLook the existing definition up by the full unique key (name, namespace\nand project id of the current security context), which is the only row\na subsequent write may collide with. Definitions of other projects are\nno longer touched, and the update targets the definition by id so the\ninner lookup is unambiguous.\n\nRelated-Bug: #2160267\nAssisted-By: Claude Fable 5 \u003cnoreply@anthropic.com\u003e\nChange-Id: I02ff0eb095ea653ae0e201058547befe8c4d6ea1\nSigned-off-by: Arnaud Morin \u003carnaud.morin@gmail.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/mistral/commit/17faa8157cf332e76002c43c1fca6bdf130b48d3"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/mistral/commit/17faa8157cf332e76002c43c1fca6bdf130b48d3"}]},"branch":"refs/heads/stable/2026.1"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"CLOSED","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY","applied_by":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"}},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":11583,"name":"Arnaud Morin","email":"arnaud.morin@gmail.com","username":"arnaudmorin"}}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dMAX"],"failing_atoms":["label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dMAX"],"failing_atoms":["label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"SATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dMAX"],"failing_atoms":["label:Workflow\u003dMIN"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
