)]}'
{"id":"openstack%2Fplacement~673555","triplet_id":"openstack%2Fplacement~master~I88e42ef18bd5b2616a93730241d2419c6b431276","project":"openstack/placement","branch":"master","topic":"cd/trait-create-order","hashtags":[],"change_id":"I88e42ef18bd5b2616a93730241d2419c6b431276","subject":"Optimize trait creation to check existence first","status":"MERGED","created":"2019-07-30 15:18:46.000000000","updated":"2019-08-08 03:47:24.000000000","submitted":"2019-08-08 03:47:24.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":19,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"673555-1565236044509-e657b839","meta_rev_id":"0a8ae614000f758f9e24dce664afb7140bd7e0e6","_number":673555,"virtual_id_number":673555,"owner":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},{"value":0,"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"value":2,"date":"2019-08-08 03:47:24.000000000","post_submit":true,"permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"}],"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":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"all":[{"value":0,"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},{"value":2,"date":"2019-08-07 15:44:06.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":2,"date":"2019-08-07 15:43:38.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"}],"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":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"all":[{"value":0,"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},{"value":1,"date":"2019-08-07 15:44:06.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},{"value":0,"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2019-08-06 06:30:26.000000000","updated_by":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"reviewer":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"state":"REVIEWER"},{"updated":"2019-08-07 15:43:38.000000000","updated_by":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"reviewer":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"state":"REVIEWER"},{"updated":"2019-08-07 15:44:06.000000000","updated_by":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"reviewer":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"state":"REVIEWER"},{"updated":"2019-08-08 03:47:24.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":"23e2e398629df439b3fe966a4cc2de310222777c","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-30 15:18:46.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"24958aea1c0cdf9a982d057e9eedc0f1f666e097","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-07-30 16:07:08.000000000","message":"Patch Set 1: Code-Review-1\n\n(5 comments)\n\nSome unit test for this would be lovely.","accounts_in_message":[],"_revision_number":1},{"id":"1ad11fc9f2acd977a369623ca9c4a0b6aeb12112","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-30 16:11:13.000000000","message":"Patch Set 1: Workflow-1\n\n(3 comments)\n\nSorry for the haste on this one, was trying to drop an idea before I lost it\n\nThere\u0027s a definite bug, but most of the rest of it is me not explaining what is going on well enough. There\u0027s definitely a cache coming in to play. I\u0027ll explain it better.","accounts_in_message":[],"_revision_number":1},{"id":"d43bd1a97255685af7e46c67f1338eb08d390628","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-30 16:13:19.000000000","message":"Patch Set 1:\n\nalso we haven\u0027t traditionally done unit tests for the handlers because the gabbit make it go\n\nIf the desire for a unit test is because I said \u0027cache\u0027, what would you think if I just said that I reordered it and left out mention of the cache entirely?","accounts_in_message":[],"_revision_number":1},{"id":"d2fb3f9dd4baf679d640e053febddbbce59a8b85","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-30 16:21:19.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"23fa9aff42cd6515418dfa001b1b88c280632e9a","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-07-30 16:41:48.000000000","message":"Patch Set 2: Code-Review-1\n\n(3 comments)\n\n\u003e also we haven\u0027t traditionally done unit tests for the handlers because the gabbit make it go\n\nYes, but the gabbits can\u0027t (easily) test e.g. that second `except` clause, whereas a unit test with some careful mocking can.\n\n\u003e If the desire for a unit test is because I said \u0027cache\u0027\n\nNo, that wasn\u0027t the reason, though proving the cache behavior (in this case that there\u0027s a miss) would be a handy part of the UT in this case.\n\nTo sum up, UT would have nailed both of the main issues I\u0027ve complained about here, whereas gabbi doesn\u0027t.","accounts_in_message":[],"_revision_number":2},{"id":"c5cbdad3218ccb6700a8afa1b890b037485cb84e","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-30 17:05:36.000000000","message":"Patch Set 2:\n\n(1 comment)\n\nI\u0027ll get to the rest of this tomorrow. I badly need a vacation.","accounts_in_message":[],"_revision_number":2},{"id":"71ebae127b5b4880bc590cc0d1d6e4cace941b96","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-07-30 20:28:25.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 http://logs.openstack.org/55/673555/2/check/grenade-py3/987f9c0/ : SUCCESS in 58m 16s\n- tempest-integrated-placement http://logs.openstack.org/55/673555/2/check/tempest-integrated-placement/3a0f908/ : SUCCESS in 1h 16m 59s\n- openstack-tox-docs http://logs.openstack.org/55/673555/2/check/openstack-tox-docs/2278eab/html/ : SUCCESS in 4m 49s\n- openstack-tox-cover http://logs.openstack.org/55/673555/2/check/openstack-tox-cover/0da95ef/cover/ : SUCCESS in 6m 12s\n- openstack-tox-lower-constraints http://logs.openstack.org/55/673555/2/check/openstack-tox-lower-constraints/1f49420/ : SUCCESS in 5m 17s\n- openstack-tox-pep8 http://logs.openstack.org/55/673555/2/check/openstack-tox-pep8/270741f/ : SUCCESS in 4m 48s\n- openstack-tox-py27 http://logs.openstack.org/55/673555/2/check/openstack-tox-py27/f2d7a84/ : SUCCESS in 4m 15s\n- openstack-tox-py36 http://logs.openstack.org/55/673555/2/check/openstack-tox-py36/0af9076/ : SUCCESS in 4m 31s\n- openstack-tox-py37 http://logs.openstack.org/55/673555/2/check/openstack-tox-py37/5aa31b5/ : SUCCESS in 5m 16s\n- openstack-tox-functional http://logs.openstack.org/55/673555/2/check/openstack-tox-functional/b878677/ : SUCCESS in 5m 31s\n- openstack-tox-functional-py36 http://logs.openstack.org/55/673555/2/check/openstack-tox-functional-py36/9e7c91c/ : SUCCESS in 5m 16s\n- openstack-tox-functional-py37 http://logs.openstack.org/55/673555/2/check/openstack-tox-functional-py37/bbf85af/ : SUCCESS in 7m 55s\n- placement-nova-tox-functional-py37 http://logs.openstack.org/55/673555/2/check/placement-nova-tox-functional-py37/0dcd84f/ : SUCCESS in 11m 56s\n- placement-nested-perfload http://logs.openstack.org/55/673555/2/check/placement-nested-perfload/0bcbcee/ : SUCCESS in 19m 47s (non-voting)\n- placement-perfload http://logs.openstack.org/55/673555/2/check/placement-perfload/88b2c63/ : SUCCESS in 7m 55s (non-voting)\n- tempest-ipv6-only http://logs.openstack.org/55/673555/2/check/tempest-ipv6-only/6843dfa/ : SUCCESS in 1h 00m 28s","accounts_in_message":[],"_revision_number":2},{"id":"aea5b910da571d937a44b9152a0cc059a76bf05a","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-31 08:59:55.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"4c6016a0c861346a3e61643c2ebe6b91118b3131","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-07-31 12:39:53.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 http://logs.openstack.org/55/673555/3/check/grenade-py3/c091424/ : SUCCESS in 56m 41s\n- tempest-integrated-placement http://logs.openstack.org/55/673555/3/check/tempest-integrated-placement/2b8b998/ : SUCCESS in 1h 19m 35s\n- openstack-tox-docs http://logs.openstack.org/55/673555/3/check/openstack-tox-docs/f38b19d/html/ : SUCCESS in 4m 46s\n- openstack-tox-cover http://logs.openstack.org/55/673555/3/check/openstack-tox-cover/46ffac5/cover/ : SUCCESS in 7m 14s\n- openstack-tox-lower-constraints http://logs.openstack.org/55/673555/3/check/openstack-tox-lower-constraints/2ee41ab/ : SUCCESS in 5m 46s\n- openstack-tox-pep8 http://logs.openstack.org/55/673555/3/check/openstack-tox-pep8/c023944/ : SUCCESS in 6m 00s\n- openstack-tox-py27 http://logs.openstack.org/55/673555/3/check/openstack-tox-py27/d44bbd2/ : SUCCESS in 6m 01s\n- openstack-tox-py36 http://logs.openstack.org/55/673555/3/check/openstack-tox-py36/ab8b4e9/ : SUCCESS in 4m 13s\n- openstack-tox-py37 http://logs.openstack.org/55/673555/3/check/openstack-tox-py37/e8901fa/ : SUCCESS in 5m 38s\n- openstack-tox-functional http://logs.openstack.org/55/673555/3/check/openstack-tox-functional/7af2c8b/ : SUCCESS in 4m 45s\n- openstack-tox-functional-py36 http://logs.openstack.org/55/673555/3/check/openstack-tox-functional-py36/41493a7/ : SUCCESS in 5m 41s\n- openstack-tox-functional-py37 http://logs.openstack.org/55/673555/3/check/openstack-tox-functional-py37/48be809/ : SUCCESS in 6m 30s\n- placement-nova-tox-functional-py37 http://logs.openstack.org/55/673555/3/check/placement-nova-tox-functional-py37/1833cd8/ : SUCCESS in 11m 02s\n- placement-nested-perfload http://logs.openstack.org/55/673555/3/check/placement-nested-perfload/303a7ea/ : SUCCESS in 16m 15s (non-voting)\n- placement-perfload http://logs.openstack.org/55/673555/3/check/placement-perfload/8a1c746/ : SUCCESS in 7m 43s (non-voting)\n- tempest-ipv6-only http://logs.openstack.org/55/673555/3/check/tempest-ipv6-only/d1049fa/ : SUCCESS in 1h 06m 15s","accounts_in_message":[],"_revision_number":3},{"id":"f2db0421ffcdcd68d49dff42be218b44160ff0ac","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-07-31 14:27:34.000000000","message":"Patch Set 3:\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"3572fae20528de5c024f130384abc9a4fba04ecd","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-31 14:36:25.000000000","message":"Patch Set 3: Workflow-1\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"e5acf8d986932081c2c5585776aa4b93c00150a9","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-07-31 14:46:21.000000000","message":"Uploaded patch set 4.","accounts_in_message":[],"_revision_number":4},{"id":"b7b48d6eadeafd5726f739b305c819bbd371c53b","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-07-31 15:26:24.000000000","message":"Patch Set 4: Code-Review+2\n\n++ Thanks Chris.","accounts_in_message":[],"_revision_number":4},{"id":"e88e1081c55983bc5c151aaf0137f4501aac8876","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-07-31 18:52:43.000000000","message":"Patch Set 4: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 http://logs.openstack.org/55/673555/4/check/grenade-py3/259e51b/ : SUCCESS in 1h 05m 54s\n- tempest-integrated-placement http://logs.openstack.org/55/673555/4/check/tempest-integrated-placement/fa12d52/ : SUCCESS in 1h 17m 10s\n- openstack-tox-docs http://logs.openstack.org/55/673555/4/check/openstack-tox-docs/3340385/html/ : SUCCESS in 5m 04s\n- openstack-tox-cover http://logs.openstack.org/55/673555/4/check/openstack-tox-cover/bfc33ca/cover/ : SUCCESS in 5m 40s\n- openstack-tox-lower-constraints http://logs.openstack.org/55/673555/4/check/openstack-tox-lower-constraints/8510d75/ : SUCCESS in 5m 20s\n- openstack-tox-pep8 http://logs.openstack.org/55/673555/4/check/openstack-tox-pep8/77d1389/ : SUCCESS in 4m 08s\n- openstack-tox-py27 http://logs.openstack.org/55/673555/4/check/openstack-tox-py27/24f352c/ : SUCCESS in 4m 39s\n- openstack-tox-py36 http://logs.openstack.org/55/673555/4/check/openstack-tox-py36/68aa2a1/ : SUCCESS in 4m 49s\n- openstack-tox-py37 http://logs.openstack.org/55/673555/4/check/openstack-tox-py37/5500d63/ : SUCCESS in 5m 16s\n- openstack-tox-functional http://logs.openstack.org/55/673555/4/check/openstack-tox-functional/64d3af3/ : SUCCESS in 4m 45s\n- openstack-tox-functional-py36 http://logs.openstack.org/55/673555/4/check/openstack-tox-functional-py36/70d9bda/ : SUCCESS in 5m 02s\n- openstack-tox-functional-py37 http://logs.openstack.org/55/673555/4/check/openstack-tox-functional-py37/3a949a7/ : SUCCESS in 5m 30s\n- placement-nova-tox-functional-py37 http://logs.openstack.org/55/673555/4/check/placement-nova-tox-functional-py37/f20b05a/ : SUCCESS in 12m 18s\n- placement-nested-perfload http://logs.openstack.org/55/673555/4/check/placement-nested-perfload/86884e7/ : SUCCESS in 15m 43s (non-voting)\n- placement-perfload http://logs.openstack.org/55/673555/4/check/placement-perfload/40ab3e5/ : SUCCESS in 8m 27s (non-voting)\n- tempest-ipv6-only http://logs.openstack.org/55/673555/4/check/tempest-ipv6-only/629837b/ : SUCCESS in 56m 11s","accounts_in_message":[],"_revision_number":4},{"id":"08eb8b08ba2a5d7d007b7393a34fa6f3c2fb2a02","author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"date":"2019-08-06 06:30:26.000000000","message":"Patch Set 4: Code-Review+1\n\n(3 comments)","accounts_in_message":[],"_revision_number":4},{"id":"15b1d7961da43afa7125aa7e514bcf47c2cc1673","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-08-06 08:25:01.000000000","message":"Uploaded patch set 5.","accounts_in_message":[],"_revision_number":5},{"id":"cf8580a99ffb3c608c5216af113247b524fd9b59","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-06 11:54:38.000000000","message":"Patch Set 5: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 https://logs.opendev.org/55/673555/5/check/grenade-py3/7b7f4d5/ : SUCCESS in 1h 07m 55s\n- tempest-integrated-placement https://logs.opendev.org/55/673555/5/check/tempest-integrated-placement/79bdcc1/ : SUCCESS in 1h 20m 26s\n- openstack-tox-docs https://logs.opendev.org/55/673555/5/check/openstack-tox-docs/3b3aaa4/html/ : SUCCESS in 4m 03s\n- openstack-tox-cover https://logs.opendev.org/55/673555/5/check/openstack-tox-cover/486961c/cover/ : SUCCESS in 6m 51s\n- openstack-tox-lower-constraints https://logs.opendev.org/55/673555/5/check/openstack-tox-lower-constraints/35b6fe2/ : SUCCESS in 6m 38s\n- openstack-tox-pep8 https://logs.opendev.org/55/673555/5/check/openstack-tox-pep8/b070354/ : SUCCESS in 5m 20s\n- openstack-tox-py27 https://logs.opendev.org/55/673555/5/check/openstack-tox-py27/f7b84ab/ : SUCCESS in 4m 30s\n- openstack-tox-py36 https://logs.opendev.org/55/673555/5/check/openstack-tox-py36/a6cec9f/ : SUCCESS in 5m 40s\n- openstack-tox-py37 https://logs.opendev.org/55/673555/5/check/openstack-tox-py37/aa659f3/ : SUCCESS in 6m 10s\n- openstack-tox-functional https://logs.opendev.org/55/673555/5/check/openstack-tox-functional/791260b/ : SUCCESS in 5m 44s\n- openstack-tox-functional-py36 https://logs.opendev.org/55/673555/5/check/openstack-tox-functional-py36/937de8c/ : SUCCESS in 4m 43s\n- openstack-tox-functional-py37 https://logs.opendev.org/55/673555/5/check/openstack-tox-functional-py37/d649ee9/ : SUCCESS in 6m 29s\n- placement-nova-tox-functional-py37 https://logs.opendev.org/55/673555/5/check/placement-nova-tox-functional-py37/c1d4846/ : SUCCESS in 12m 27s\n- placement-nested-perfload https://logs.opendev.org/55/673555/5/check/placement-nested-perfload/8275e65/ : SUCCESS in 16m 27s (non-voting)\n- placement-perfload https://logs.opendev.org/55/673555/5/check/placement-perfload/baa0278/ : SUCCESS in 9m 06s (non-voting)\n- tempest-ipv6-only https://logs.opendev.org/55/673555/5/check/tempest-ipv6-only/0501cab/ : SUCCESS in 1h 09m 03s","accounts_in_message":[],"_revision_number":5},{"id":"ad0af5d2ae7f04d5bc894314b2b1a8b57a11ad2c","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-08-06 15:16:26.000000000","message":"Patch Set 5: Code-Review+2","accounts_in_message":[],"_revision_number":5},{"id":"656d25f2a9883972f3a6ff6118f9f24791925f84","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2019-08-07 13:23:29.000000000","message":"Patch Set 5: Code-Review-1\n\n(1 comment)\n\nI think this patch regressed the create_at handling.","accounts_in_message":[],"_revision_number":5},{"id":"aeaa8fe607aa23d0685d5dfb7356f9cdd7f779de","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-08-07 13:26:20.000000000","message":"Patch Set 5: Workflow-1\n\n(1 comment)","accounts_in_message":[],"_revision_number":5},{"id":"633017684bb822eb3c7d6dcd59dff81a3164e19f","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-08-07 14:00:22.000000000","message":"Patch Set 5: -Code-Review","accounts_in_message":[],"_revision_number":5},{"id":"62ff56ffe8cd58315dcc93a0a47e8f66aa9a5015","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-08-07 14:04:47.000000000","message":"Uploaded patch set 6.","accounts_in_message":[],"_revision_number":6},{"id":"cd80b41336831119650c095e1874b55c1a6ebb24","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2019-08-07 14:17:27.000000000","message":"Patch Set 6: Code-Review+2\n\nLGTM","accounts_in_message":[],"_revision_number":6},{"id":"faebd27a07a3f0eadf9d4bb67c76f3a2bc8680a6","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-08-07 15:18:27.000000000","message":"Patch Set 6: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":6},{"id":"adaba29a4d6782d6a0ca1f91e53999908b1a4733","author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"date":"2019-08-07 15:42:10.000000000","message":"Uploaded patch set 7.","accounts_in_message":[],"_revision_number":7},{"id":"d64ede1348caa3a372d00c4545de0c86104afd34","author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"date":"2019-08-07 15:43:38.000000000","message":"Patch Set 7: Code-Review+2","accounts_in_message":[],"_revision_number":7},{"id":"cab96cc170e8afcd338f60cd0e115994de291429","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-08-07 15:44:06.000000000","message":"Patch Set 7: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":7},{"id":"385ba8560e35f1f78d29979e925ae8d142045062","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-07 19:04:56.000000000","message":"Patch Set 7: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 https://logs.opendev.org/55/673555/7/check/grenade-py3/98160e6/ : SUCCESS in 1h 03m 14s\n- tempest-integrated-placement https://logs.opendev.org/55/673555/7/check/tempest-integrated-placement/965687a/ : SUCCESS in 1h 29m 07s\n- openstack-tox-docs https://logs.opendev.org/55/673555/7/check/openstack-tox-docs/63ef855/html/ : SUCCESS in 4m 12s\n- openstack-tox-cover https://logs.opendev.org/55/673555/7/check/openstack-tox-cover/ca4d85b/cover/ : SUCCESS in 5m 14s\n- openstack-tox-lower-constraints https://logs.opendev.org/55/673555/7/check/openstack-tox-lower-constraints/ddb34d8/ : SUCCESS in 6m 11s\n- openstack-tox-pep8 https://logs.opendev.org/55/673555/7/check/openstack-tox-pep8/562ab4c/ : SUCCESS in 4m 51s\n- openstack-tox-py27 https://logs.opendev.org/55/673555/7/check/openstack-tox-py27/ca06855/ : SUCCESS in 4m 54s\n- openstack-tox-py36 https://logs.opendev.org/55/673555/7/check/openstack-tox-py36/73607f7/ : SUCCESS in 4m 08s\n- openstack-tox-py37 https://logs.opendev.org/55/673555/7/check/openstack-tox-py37/625c186/ : SUCCESS in 4m 41s\n- openstack-tox-functional https://logs.opendev.org/55/673555/7/check/openstack-tox-functional/082be1a/ : SUCCESS in 5m 20s\n- openstack-tox-functional-py36 https://logs.opendev.org/55/673555/7/check/openstack-tox-functional-py36/8c9411f/ : SUCCESS in 6m 42s\n- openstack-tox-functional-py37 https://logs.opendev.org/55/673555/7/check/openstack-tox-functional-py37/025ab1d/ : SUCCESS in 5m 21s\n- placement-nova-tox-functional-py37 https://logs.opendev.org/55/673555/7/check/placement-nova-tox-functional-py37/b3a4068/ : SUCCESS in 14m 56s\n- placement-nested-perfload https://logs.opendev.org/55/673555/7/check/placement-nested-perfload/41e35d0/ : SUCCESS in 16m 03s (non-voting)\n- placement-perfload https://logs.opendev.org/55/673555/7/check/placement-perfload/55bb656/ : SUCCESS in 8m 21s (non-voting)\n- tempest-ipv6-only https://logs.opendev.org/55/673555/7/check/tempest-ipv6-only/d0999bd/ : SUCCESS in 1h 08m 07s","accounts_in_message":[],"_revision_number":7},{"id":"578cf3c10dad41a68fb56efbd7867f4981130885","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-07 19:05:21.000000000","message":"Patch Set 7: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":7},{"id":"300cdeeeb9b8fad62c4389514666b13ca5e4aa18","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-07 20:40:00.000000000","message":"Patch Set 7: Verified-2\n\nBuild failed (gate pipeline).  For information on how to proceed, see\nhttp://docs.openstack.org/infra/manual/developers.html#automated-testing\n\n\n- grenade-py3 https://logs.opendev.org/55/673555/7/gate/grenade-py3/e293e3e/ : FAILURE in 1h 07m 29s\n- tempest-integrated-placement https://logs.opendev.org/55/673555/7/gate/tempest-integrated-placement/371b85d/ : SUCCESS in 1h 23m 10s\n- openstack-tox-docs https://logs.opendev.org/55/673555/7/gate/openstack-tox-docs/03972a4/html/ : SUCCESS in 6m 01s\n- openstack-tox-lower-constraints https://logs.opendev.org/55/673555/7/gate/openstack-tox-lower-constraints/0ddee73/ : SUCCESS in 5m 15s\n- openstack-tox-pep8 https://logs.opendev.org/55/673555/7/gate/openstack-tox-pep8/df6d98c/ : SUCCESS in 5m 40s\n- openstack-tox-py27 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py27/272a473/ : SUCCESS in 5m 55s\n- openstack-tox-py36 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py36/f4d1bb0/ : SUCCESS in 5m 23s\n- openstack-tox-py37 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py37/02966bb/ : SUCCESS in 5m 56s\n- openstack-tox-functional https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional/8beb444/ : SUCCESS in 6m 23s\n- openstack-tox-functional-py36 https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional-py36/891930f/ : SUCCESS in 7m 27s\n- openstack-tox-functional-py37 https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional-py37/bc5ce98/ : SUCCESS in 5m 55s\n- placement-nova-tox-functional-py37 https://logs.opendev.org/55/673555/7/gate/placement-nova-tox-functional-py37/2477dd8/ : SUCCESS in 12m 08s\n- tempest-ipv6-only https://logs.opendev.org/55/673555/7/gate/tempest-ipv6-only/7b7b619/ : SUCCESS in 1h 12m 57s","accounts_in_message":[],"_revision_number":7},{"id":"f2f0c1cba7d542d7711de0c96521ce9847057584","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-08-07 22:37:04.000000000","message":"Patch Set 7:\n\nrecheck","accounts_in_message":[],"_revision_number":7},{"id":"a403b1b9b0cae2331ddf6a5666cadc3eb8bbd174","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-08 02:19:58.000000000","message":"Patch Set 7: Verified+1\n\nBuild succeeded (check pipeline).\n\n- grenade-py3 https://logs.opendev.org/55/673555/7/check/grenade-py3/53a035d/ : SUCCESS in 57m 36s\n- tempest-integrated-placement https://logs.opendev.org/55/673555/7/check/tempest-integrated-placement/430a45b/ : SUCCESS in 1h 14m 14s\n- openstack-tox-docs https://logs.opendev.org/55/673555/7/check/openstack-tox-docs/0e9d6c1/html/ : SUCCESS in 4m 32s\n- openstack-tox-cover https://logs.opendev.org/55/673555/7/check/openstack-tox-cover/69e3a5d/cover/ : SUCCESS in 7m 02s\n- openstack-tox-lower-constraints https://logs.opendev.org/55/673555/7/check/openstack-tox-lower-constraints/60e35cc/ : SUCCESS in 5m 47s\n- openstack-tox-pep8 https://logs.opendev.org/55/673555/7/check/openstack-tox-pep8/e908319/ : SUCCESS in 4m 45s\n- openstack-tox-py27 https://logs.opendev.org/55/673555/7/check/openstack-tox-py27/eea4713/ : SUCCESS in 5m 19s\n- openstack-tox-py36 https://logs.opendev.org/55/673555/7/check/openstack-tox-py36/8c88354/ : SUCCESS in 6m 41s\n- openstack-tox-py37 https://logs.opendev.org/55/673555/7/check/openstack-tox-py37/ee2bb9e/ : SUCCESS in 5m 52s\n- openstack-tox-functional https://logs.opendev.org/55/673555/7/check/openstack-tox-functional/1350297/ : SUCCESS in 5m 53s\n- openstack-tox-functional-py36 https://logs.opendev.org/55/673555/7/check/openstack-tox-functional-py36/fa7d818/ : SUCCESS in 5m 41s\n- openstack-tox-functional-py37 https://logs.opendev.org/55/673555/7/check/openstack-tox-functional-py37/764d054/ : SUCCESS in 5m 36s\n- placement-nova-tox-functional-py37 https://logs.opendev.org/55/673555/7/check/placement-nova-tox-functional-py37/0d2f62d/ : SUCCESS in 14m 21s\n- placement-nested-perfload https://logs.opendev.org/55/673555/7/check/placement-nested-perfload/e956329/ : SUCCESS in 11m 28s (non-voting)\n- placement-perfload https://logs.opendev.org/55/673555/7/check/placement-perfload/97f1fc5/ : SUCCESS in 8m 15s (non-voting)\n- tempest-ipv6-only https://logs.opendev.org/55/673555/7/check/tempest-ipv6-only/65e8246/ : SUCCESS in 1h 02m 47s","accounts_in_message":[],"_revision_number":7},{"id":"80f05bc2c192180e7cbe8eaf49e7e400792afe6d","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-08 02:20:14.000000000","message":"Patch Set 7: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":7},{"id":"6d745fe9951e42fa1c18c7e1ebac044a0941e1e6","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-08 03:47:24.000000000","message":"Change has been successfully merged by Zuul","accounts_in_message":[],"_revision_number":7},{"id":"4696597ab9e9fb6af5429f9dcc444851b7932d87","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-08-08 03:47:24.000000000","message":"Patch Set 7: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- grenade-py3 https://logs.opendev.org/55/673555/7/gate/grenade-py3/ede24d4/ : SUCCESS in 1h 03m 54s\n- tempest-integrated-placement https://logs.opendev.org/55/673555/7/gate/tempest-integrated-placement/e16026c/ : SUCCESS in 1h 25m 23s\n- openstack-tox-docs https://logs.opendev.org/55/673555/7/gate/openstack-tox-docs/129bbaf/html/ : SUCCESS in 4m 46s\n- openstack-tox-lower-constraints https://logs.opendev.org/55/673555/7/gate/openstack-tox-lower-constraints/dc7fe57/ : SUCCESS in 5m 22s\n- openstack-tox-pep8 https://logs.opendev.org/55/673555/7/gate/openstack-tox-pep8/9979fc3/ : SUCCESS in 4m 20s\n- openstack-tox-py27 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py27/7583508/ : SUCCESS in 6m 04s\n- openstack-tox-py36 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py36/73e8b6b/ : SUCCESS in 7m 30s\n- openstack-tox-py37 https://logs.opendev.org/55/673555/7/gate/openstack-tox-py37/9f07381/ : SUCCESS in 6m 03s\n- openstack-tox-functional https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional/6d94a91/ : SUCCESS in 5m 30s\n- openstack-tox-functional-py36 https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional-py36/370ad55/ : SUCCESS in 5m 29s\n- openstack-tox-functional-py37 https://logs.opendev.org/55/673555/7/gate/openstack-tox-functional-py37/51c449b/ : SUCCESS in 6m 33s\n- placement-nova-tox-functional-py37 https://logs.opendev.org/55/673555/7/gate/placement-nova-tox-functional-py37/03ca127/ : SUCCESS in 13m 00s\n- tempest-ipv6-only https://logs.opendev.org/55/673555/7/gate/tempest-ipv6-only/ad606ed/ : SUCCESS in 1h 06m 48s","accounts_in_message":[],"_revision_number":7}],"current_revision_number":7,"current_revision":"5fd2d18c30642786b2475762c2f054a953f79c22","revisions":{"9111928f1a6b0113504d49dd5c7665e4fcf7395a":{"kind":"REWORK","_number":1,"created":"2019-07-30 15:18:46.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/1"}}},"commit":{"parents":[{"commit":"2f56f379a568d427ac9057086386074a7801b00c","subject":"Merge \"Use integrated-gate-placement zuul template\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/2f56f379a568d427ac9057086386074a7801b00c"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"subject":"Optimize trait creation to use cache","message":"Optimize trait creation to use cache\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check the cache first before\nattempting to do a create(). The meant that in the fairly common\ncase where a reource class already existed the database would be hit\nonly once, instead of twice.\n\nThis change updates the \"ensure trait\" routine to be the same as the\n\"ensure resource class\" routine: check that it is already there,\nfirst. Since it is best practice to always ensure trait or resource\nclass before using a CUSTOM_ one, this is a good orientation.\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/9111928f1a6b0113504d49dd5c7665e4fcf7395a"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/9111928f1a6b0113504d49dd5c7665e4fcf7395a"}]},"branch":"refs/heads/master"},"b04c771a9ffdf8c0eb31522eb10fd4850b74ae00":{"kind":"REWORK","_number":2,"created":"2019-07-30 16:21:19.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/2"}}},"commit":{"parents":[{"commit":"2f56f379a568d427ac9057086386074a7801b00c","subject":"Merge \"Use integrated-gate-placement zuul template\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/2f56f379a568d427ac9057086386074a7801b00c"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 16:14:30.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). The meant that in the fairly common\ncase where a reource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in client\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass of Trait cache. However, at\nthis stage in processing, the cache is empty and call to get_by_name will\nfill it.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/b04c771a9ffdf8c0eb31522eb10fd4850b74ae00"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/b04c771a9ffdf8c0eb31522eb10fd4850b74ae00"}]},"branch":"refs/heads/master"},"31d88703782f00271240a6a7197f6899c2698983":{"kind":"REWORK","_number":3,"created":"2019-07-31 08:59:55.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/3"}}},"commit":{"parents":[{"commit":"a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac","subject":"Use TraitCache for Trait.get_by_name","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-31 08:56:35.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). This meant that in the fairly common\ncase where a reource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in clients\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass or Trait cache. However, at\nthis stage in processing, the cache is empty and calls to get_by_name\nwill fill it.\n\nA unit test is added to confirm the the \u0027put_trait\u0027 handler will\nlook at get_by_name. The general behavior of whether a trait is\nis created or updated is confirmed by the gabbit tests in trait.yaml.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/31d88703782f00271240a6a7197f6899c2698983"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/31d88703782f00271240a6a7197f6899c2698983"}]},"branch":"refs/heads/master"},"baea7003603e6c957002d501fafe7f95896885d8":{"kind":"REWORK","_number":4,"created":"2019-07-31 14:46:21.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/4","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/4","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/4"}}},"commit":{"parents":[{"commit":"a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac","subject":"Use TraitCache for Trait.get_by_name","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-31 14:40:26.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). This meant that in the fairly common\ncase where a reource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in clients\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass or Trait cache. However, at\nthis stage in processing, the cache is empty and calls to get_by_name\nwill fill it.\n\nA unit test is added to confirm that the \u0027put_trait\u0027 handler will look\nat get_by_name and then go back to assuming the trait exists if the\ncreate() fails because it already exists. The general behavior of\nwhether a trait is is created or updated is confirmed by the gabbit\ntests in trait.yaml.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/baea7003603e6c957002d501fafe7f95896885d8"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/baea7003603e6c957002d501fafe7f95896885d8"}]},"branch":"refs/heads/master"},"b2449e3f91a8d393d00abcb8195160b00772b232":{"kind":"REWORK","_number":5,"created":"2019-08-06 08:25:01.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/5","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/5","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/5 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/5 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/5 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/5"}}},"commit":{"parents":[{"commit":"a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac","subject":"Use TraitCache for Trait.get_by_name","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-08-06 08:24:11.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). This meant that in the fairly common\ncase where a resource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in clients\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass or Trait cache. However, at\nthis stage in processing, the cache is empty and calls to get_by_name\nwill fill it.\n\nA unit test is added to confirm that the \u0027put_trait\u0027 handler will look\nat get_by_name and then go back to assuming the trait exists if the\ncreate() fails because it already exists. The general behavior of\nwhether a trait is created or updated is confirmed by the gabbit\ntests in trait.yaml.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/b2449e3f91a8d393d00abcb8195160b00772b232"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/b2449e3f91a8d393d00abcb8195160b00772b232"}]},"branch":"refs/heads/master"},"bc4617f0c968ba6526958046fdba60ec158d9153":{"kind":"REWORK","_number":6,"created":"2019-08-07 14:04:47.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/6","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/6","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/6 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/6 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/6 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/6"}}},"commit":{"parents":[{"commit":"a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac","subject":"Use TraitCache for Trait.get_by_name","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-08-07 14:03:26.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). This meant that in the fairly common\ncase where a resource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in clients\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass or Trait cache. However, at\nthis stage in processing, the cache is empty and calls to get_by_name\nwill fill it.\n\nA unit test is added to confirm that the \u0027put_trait\u0027 handler will look\nat get_by_name and then go back to assuming the trait exists if the\ncreate() fails because it already exists. The general behavior of\nwhether a trait is created or updated is confirmed by the gabbit\ntests in trait.yaml. That test also confirms that we have a legit\nlast-modified time when we fall through both exceptions and make\nthe assumption that a trait was created by some other thread. It is\nsafe to use \u0027now\u0027 as the last-modified time because it was created\nin this same second, just not by us.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/bc4617f0c968ba6526958046fdba60ec158d9153"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/bc4617f0c968ba6526958046fdba60ec158d9153"}]},"branch":"refs/heads/master"},"5fd2d18c30642786b2475762c2f054a953f79c22":{"kind":"REWORK","_number":7,"created":"2019-08-07 15:42:10.000000000","uploader":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"ref":"refs/changes/55/673555/7","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/placement","ref":"refs/changes/55/673555/7","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/7 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/7 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/placement refs/changes/55/673555/7 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/placement refs/changes/55/673555/7"}}},"commit":{"parents":[{"commit":"a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac","subject":"Use TraitCache for Trait.get_by_name","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/a0e2c0273fe7ea6e04c65f96728cc74b5f1815ac"}]}],"author":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-07-30 15:14:25.000000000","tz":60},"committer":{"name":"Chris Dent","email":"cdent@anticdent.org","date":"2019-08-07 15:41:57.000000000","tz":60},"subject":"Optimize trait creation to check existence first","message":"Optimize trait creation to check existence first\n\nComparing benchmarks of creating (repeated) resource classes with\ntraits, it became clear that creating resource classes [1] was about\n1/3rd faster. Comparing the code, they were very similar, however\nthe resource class side was ordered to check for existence first\nbefore attempting to do a create(). This meant that in the fairly common\ncase where a resource class already existed we could finish early.\n\nThis change updates the code so that the common idiom used in clients\nof \"ensuring a trait\" with PUT /traits/$name routine to be the same\nas the \"ensuring a resource class\" with PUT /resource_classes/$name\nroutine: check that it is already there, first. Since it is best\npractice to always ensure trait or resource class before using a\nCUSTOM_ one, this is a good orientation.\n\nNote that with the recent addition of the AttributeCache, these queries\nfor get_by_name [2] go to the ResourceClass or Trait cache. However, at\nthis stage in processing, the cache is empty and calls to get_by_name\nwill fill it.\n\nA unit test is added to confirm that the \u0027put_trait\u0027 handler will look\nat get_by_name and then go back to assuming the trait exists if the\ncreate() fails because it already exists. The general behavior of\nwhether a trait is created or updated is confirmed by the gabbit\ntests in trait.yaml. That test also confirms that we have a legit\nlast-modified time when we fall through both exceptions and make\nthe assumption that a trait was created by some other thread. It is\nsafe to use \u0027now\u0027 as the last-modified time because it was created\nin this same second, just not by us.\n\n[1] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/handlers/resource_class.py#L209\n[2] https://opendev.org/openstack/placement/src/commit/2f56f379a568d427ac9057086386074a7801b00c/placement/objects/resource_class.py#L72\n\nChange-Id: I88e42ef18bd5b2616a93730241d2419c6b431276\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/5fd2d18c30642786b2475762c2f054a953f79c22"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/placement/commit/5fd2d18c30642786b2475762c2f054a953f79c22"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
