)]}'
{"id":"openstack%2Fkeystone~936329","triplet_id":"openstack%2Fkeystone~unmaintained%2F2023.1~I8c45131b298ceae7b43b42e2c5df167607d18c48","project":"openstack/keystone","branch":"unmaintained/2023.1","topic":"appcred-validation-speed2-unmaintained/2023.1","attention_set":{},"removed_from_attention_set":{"21107":{"account":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"last_update":"2025-02-27 09:28:37.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I8c45131b298ceae7b43b42e2c5df167607d18c48","subject":"Improve application credential validation speed","status":"MERGED","created":"2024-11-27 07:10:43.000000000","updated":"2025-02-27 09:30:02.000000000","submitted":"2025-02-27 09:28:37.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":2,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"936329-appcred-validation-speed2-unmaintained/2023.1","cherry_pick_of_change":880456,"cherry_pick_of_patch_set":4,"meta_rev_id":"bf79db092036c4a52855c6b810a7837b17c98063","_number":936329,"virtual_id_number":936329,"owner":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2025-02-27 09:28:37.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"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":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"all":[{"value":2,"date":"2025-02-27 07:21:09.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":2,"date":"2025-02-26 14:20:49.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"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":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"all":[{"value":1,"date":"2025-02-27 07:21:09.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"value":0,"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2024-11-27 08:23:26.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"},{"updated":"2025-02-26 14:20:49.000000000","updated_by":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"reviewer":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"state":"REVIEWER"},{"updated":"2025-02-27 07:21:09.000000000","updated_by":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"reviewer":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"state":"REVIEWER"}],"messages":[{"id":"2ef33f31cef323aa060b1337f9f77a6e738165d7","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"date":"2024-11-27 07:10:43.000000000","message":"Patch Set 1: Cherry Picked from branch master.","accounts_in_message":[],"_revision_number":1},{"id":"a0310e2005db96ae52bf87eaf316abe5995134c0","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2024-11-27 08:23:26.000000000","message":"Patch Set 1: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see\nhttps://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing\nand https://docs.openstack.org/project-team-guide/testing.html#how-to-handle-test-failures\n\nhttps://zuul.opendev.org/t/openstack/buildset/e326b5b9e2814c1ab874f5e8c4df8ffa\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/21b202fbe0d94fd6980fd0378e4c7e1d : SUCCESS in 15m 00s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/9a01e76d176e44de9310e2f6b0291bcc : SUCCESS in 5m 43s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/dd71c3ac80414103aa42d2b07281b1bb : SUCCESS in 11m 05s\n- grenade https://zuul.opendev.org/t/openstack/build/8c5a271d1cdd46ce8a465e9de610cee3 : SUCCESS in 44m 10s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/7856629684c144388ca350ef4ba198bb : SUCCESS in 1h 11m 31s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/89a3119b6a9e4eabb1d1a7387eb0f525 : SUCCESS in 21m 56s\n- keystone-dsvm-py3-functional-fips https://zuul.opendev.org/t/openstack/build/4c9a5db6969f40c6a1090078f2b904ba : SUCCESS in 28m 42s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal https://zuul.opendev.org/t/openstack/build/f6ab0777c3f64d1e9a6fb721d0b518c6 : FAILURE in 20m 11s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k https://zuul.opendev.org/t/openstack/build/75249bfebaf044458be416f9044b07ea : SUCCESS in 23m 33s\n- keystoneclient-devstack-functional https://zuul.opendev.org/t/openstack/build/20484255bd10472c8a8458f3a13ef28f : SUCCESS in 8m 20s (non-voting)\n- keystone-dsvm-ldap-domain-specific-driver https://zuul.opendev.org/t/openstack/build/df880ed151ae40da9eefaa8117e95b6f : FAILURE in 11m 31s (non-voting)\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/b7c02d05365b4f2898af780921cb567d : FAILURE in 55m 17s","accounts_in_message":[],"_revision_number":1},{"id":"3046e2f574f3cbf21d40ca69de037e7428bb8d5f","author":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"date":"2025-01-14 08:57:34.000000000","message":"Patch Set 1:\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"55f12236645993230a397d83f08a26d33f0737f6","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-01-14 10:19:41.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/845111f968074b1ab9400269038302ec\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/d658b793252e42809e0bbcfbedd285e7 : SUCCESS in 13m 43s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/ce1e1a7da02a46349e52a3cdcc3ee82a : SUCCESS in 6m 20s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/085e837f15544580ad09a0f89eb6939a : SUCCESS in 11m 24s\n- grenade https://zuul.opendev.org/t/openstack/build/c8e85474dd1d42ea8c93f9cca578904c : SUCCESS in 1h 06m 15s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/104775580960440a90dd405cb2451dda : SUCCESS in 1h 15m 31s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/42c32c98dbc1425f9434317c1b80cb3e : SUCCESS in 20m 07s\n- keystone-dsvm-py3-functional-fips https://zuul.opendev.org/t/openstack/build/fc2ad70e34424c628ad67b0ce0f2f5c2 : SUCCESS in 31m 38s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal https://zuul.opendev.org/t/openstack/build/5f9c6e8aaf134c878b377b956b836404 : FAILURE in 18m 58s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k https://zuul.opendev.org/t/openstack/build/570d9a2faf4842d1a6d84ab266d70fd6 : SUCCESS in 20m 32s\n- keystoneclient-devstack-functional https://zuul.opendev.org/t/openstack/build/cfb6ba97a3a641dc9ed9d8f093fe3973 : SUCCESS in 10m 41s (non-voting)\n- keystone-dsvm-ldap-domain-specific-driver https://zuul.opendev.org/t/openstack/build/f875eb1cc5eb4822b7d4e9cad7bebb6c : FAILURE in 12m 50s (non-voting)\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/d67a1ae9aca64a4fba2716ee7e2c995a : SUCCESS in 44m 38s","accounts_in_message":[],"_revision_number":1},{"id":"8572f8507995252d470812563e661ab33b512931","author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"date":"2025-02-26 14:20:49.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"9d395cc0ecdded482b1755f808119095b7616ee6","author":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"date":"2025-02-27 07:21:09.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1\n\n(1 comment)","accounts_in_message":[],"_revision_number":1},{"id":"996f8f8ec5ce78e79175e7bb6b65b27ec61d6756","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-02-27 07:21:39.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"1b14453770c4982ee5490f4a07d05cec4c1b5d0f","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-02-27 09:28:37.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/42d11ebad1ad4b928894ec3f5cd76c2a\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/c9525fd76661482abd58c52028d04578 : SUCCESS in 5m 01s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/31e26fd2b8d34f14934e4f6b90efe456 : SUCCESS in 11m 06s\n- grenade https://zuul.opendev.org/t/openstack/build/2ad8af9bb38f48ffb8d78e1727b45ac5 : SUCCESS in 1h 00m 34s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/efc20150ae7d499395a2d868074d6101 : SUCCESS in 1h 51m 17s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/8f838e6620bb4333b807a648178624c9 : SUCCESS in 21m 20s\n- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k https://zuul.opendev.org/t/openstack/build/b0be550e73c947389888a9f8008afd1f : SUCCESS in 29m 32s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/febcb7e39715483593ead3eb5249c6f8 : SUCCESS in 1h 59m 45s","accounts_in_message":[],"_revision_number":1},{"id":"8992c14bbbe1fee7cc5e6149a4451c2c91a195e4","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-02-27 09:28:37.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"bf79db092036c4a52855c6b810a7837b17c98063","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2025-02-27 09:30:02.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\nhttps://zuul.opendev.org/t/openstack/buildset/a6f0932e3ccb43bcab72df26380a6d74\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/e4d291f93fef46f896ea7747bf9cf960 : SUCCESS in 1m 03s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"e4b40af0ae3698fbbbbfb8c22468b33aae80e6d7","revisions":{"e4b40af0ae3698fbbbbfb8c22468b33aae80e6d7":{"kind":"REWORK","_number":1,"created":"2024-11-27 07:10:43.000000000","uploader":{"_account_id":21107,"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","username":"lathiat"},"ref":"refs/changes/29/936329/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/keystone","ref":"refs/changes/29/936329/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/keystone refs/changes/29/936329/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/keystone refs/changes/29/936329/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/keystone refs/changes/29/936329/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/keystone refs/changes/29/936329/1"}}},"commit":{"parents":[{"commit":"9e3dfb4bcf39394462c0b1c1625beb3276c2f5eb","subject":"Update .gitreview for unmaintained/2023.1","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/9e3dfb4bcf39394462c0b1c1625beb3276c2f5eb"}]}],"author":{"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","date":"2024-01-02 08:46:24.000000000","tz":0},"committer":{"name":"Trent Lloyd","email":"trent.lloyd@canonical.com","date":"2024-11-27 07:10:43.000000000","tz":0},"subject":"Improve application credential validation speed","message":"Improve application credential validation speed\n\nValidating an application credential token is very slow, taking at least\n400ms+ in a simple devstack environment, 5-10x longer than validating a\nuser/password project token.\n\nThe primary bottleneck during a token validation request\n(/v3/auth/tokens) is that token.roles is evaluated at least 5 times.\nvalidate_token is called twice, first during RBAC to populate the\nsubject token context and again to actually validate the token. Each\ncall to validate_token then called token.roles twice because it first\nchecks if it is None, before calling it again to use the result. Lastly\ntoken.roles is evaluated a fifth time during\nrender_token_response_from_model.\n\nEach evaluation of token.roles calls through\n_get_application_credential_roles into list_role_assignments which then\nmakes multiple round-trip SQL queries to the database.\n\nUnlike the related get_roles_for_user_and_project function, none of\nthese calls are currently cached/memoized. We memoize\nlist_role_assignments to get the same-speedup.\n\nReduce the number of token.roles calls to only 3 by storing and re-using\nthe token.roles result in validate_token, then memoize\nlist_role_assignments so the 2nd and 3rd call fetch from the cache\ninstead of repeating many SQL queries.\n\nThis provides a substantial performance improvement bringing validation\ntime in-line with user/password tokens.\n\nChange-Id: I8c45131b298ceae7b43b42e2c5df167607d18c48\n(cherry picked from commit 67b5cca032c36ef67a8aee9db6adada9b403dc5c)\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/e4b40af0ae3698fbbbbfb8c22468b33aae80e6d7"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/e4b40af0ae3698fbbbbfb8c22468b33aae80e6d7"}]},"branch":"refs/heads/unmaintained/2023.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":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"}},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"}}]}],"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":{}}},{"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":{}}},{"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":{}}}]}
