)]}'
{"id":"openstack%2Fkeystone~666960","triplet_id":"openstack%2Fkeystone~master~Ica7037541a1305308ed743d8e04a3c2f02a2b811","project":"openstack/keystone","branch":"master","topic":"dont_call_c_on_selects","hashtags":[],"change_id":"Ica7037541a1305308ed743d8e04a3c2f02a2b811","subject":"Don\u0027t call .c from select() objects","status":"MERGED","created":"2019-06-22 15:20:19.000000000","updated":"2019-06-24 19:18:57.000000000","submitted":"2019-06-24 19:18:57.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":"666960-1561403937789-f1e7b0d6","meta_rev_id":"c895734c4cabe2097eac988019a84cf4155c86c7","_number":666960,"virtual_id_number":666960,"owner":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"value":2,"date":"2019-06-24 19:18:57.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},{"value":0,"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"}],"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":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"all":[{"value":2,"date":"2019-06-24 15:33:50.000000000","_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":1,"date":"2019-06-24 06:16:19.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},{"value":2,"date":"2019-06-23 15:43:38.000000000","_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"}],"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":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"all":[{"value":1,"date":"2019-06-24 15:33:50.000000000","_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},{"value":0,"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2019-06-23 15:43:38.000000000","updated_by":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"reviewer":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"state":"REVIEWER"},{"updated":"2019-06-24 06:16:19.000000000","updated_by":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"reviewer":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"state":"REVIEWER"},{"updated":"2019-06-24 15:33:50.000000000","updated_by":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"reviewer":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"state":"REVIEWER"},{"updated":"2019-06-24 19:18:57.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":"7173c6eb19ece03a7ce499b313863b4c8a080c93","author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"date":"2019-06-22 15:20:19.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"9af4cf9a9d619362958bd37e03ba0c9bf73d6f44","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-06-22 15:56:51.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-cover http://logs.openstack.org/60/666960/1/check/openstack-tox-cover/66958cc/cover/ : SUCCESS in 30m 03s\n- openstack-tox-lower-constraints http://logs.openstack.org/60/666960/1/check/openstack-tox-lower-constraints/278ae0b/ : SUCCESS in 36m 05s\n- openstack-tox-pep8 http://logs.openstack.org/60/666960/1/check/openstack-tox-pep8/6ef1a3d/ : SUCCESS in 5m 33s\n- openstack-tox-py27 http://logs.openstack.org/60/666960/1/check/openstack-tox-py27/abaf5b8/ : SUCCESS in 28m 30s\n- openstack-tox-py36 http://logs.openstack.org/60/666960/1/check/openstack-tox-py36/6fa9fbc/ : SUCCESS in 20m 50s\n- openstack-tox-py37 http://logs.openstack.org/60/666960/1/check/openstack-tox-py37/aca3b36/ : SUCCESS in 19m 33s\n- openstack-tox-docs http://logs.openstack.org/60/666960/1/check/openstack-tox-docs/d702f66/html/ : SUCCESS in 7m 08s","accounts_in_message":[],"_revision_number":1},{"id":"18e5fe549dfebacc0a87e2a0de995a27ec1b1298","author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"date":"2019-06-23 15:43:38.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"18aea101ecf6fadf67999e39427bd536629d6036","author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"date":"2019-06-24 06:16:19.000000000","message":"Patch Set 1: Code-Review+1\n\nThanks Mike. Looks good.","accounts_in_message":[],"_revision_number":1},{"id":"02c1bed28a80450e34744e169f2c815519d0b366","author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"date":"2019-06-24 15:33:50.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"082d4aa77e4447b958ee2b6868e07ffd705529e7","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-06-24 15:34:14.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"9ed976b394032712d5204af6764b36cdc45075a4","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-06-24 19:18:57.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- openstack-tox-lower-constraints http://logs.openstack.org/60/666960/1/gate/openstack-tox-lower-constraints/198b729/ : SUCCESS in 31m 59s\n- openstack-tox-pep8 http://logs.openstack.org/60/666960/1/gate/openstack-tox-pep8/5db8e23/ : SUCCESS in 8m 47s\n- openstack-tox-py27 http://logs.openstack.org/60/666960/1/gate/openstack-tox-py27/f3dc4e5/ : SUCCESS in 21m 41s\n- openstack-tox-py36 http://logs.openstack.org/60/666960/1/gate/openstack-tox-py36/47a165e/ : SUCCESS in 24m 34s\n- openstack-tox-py37 http://logs.openstack.org/60/666960/1/gate/openstack-tox-py37/0b1a3b6/ : SUCCESS in 24m 19s\n- openstack-tox-docs http://logs.openstack.org/60/666960/1/gate/openstack-tox-docs/22fa3d5/html/ : SUCCESS in 7m 34s","accounts_in_message":[],"_revision_number":1},{"id":"22f1a3e48362fca496ce96c4cd782a5a1bf82a20","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-06-24 19:18:57.000000000","message":"Change has been successfully merged by Zuul","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"48594eddeabdb79aa446a62ed390f9866b848fc9","revisions":{"48594eddeabdb79aa446a62ed390f9866b848fc9":{"kind":"REWORK","_number":1,"created":"2019-06-22 15:20:19.000000000","uploader":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"ref":"refs/changes/60/666960/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/keystone","ref":"refs/changes/60/666960/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/keystone refs/changes/60/666960/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/keystone refs/changes/60/666960/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/keystone refs/changes/60/666960/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/keystone refs/changes/60/666960/1"}}},"commit":{"parents":[{"commit":"d81225376abb35235ba45bf535215e48d84b1ec9","subject":"Merge \"Fix E731 flake8\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/d81225376abb35235ba45bf535215e48d84b1ec9"}]}],"author":{"name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","date":"2019-06-22 15:03:41.000000000","tz":-240},"committer":{"name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","date":"2019-06-22 15:03:41.000000000","tz":-240},"subject":"Don\u0027t call .c from select() objects","message":"Don\u0027t call .c from select() objects\n\nThe .c attribute on a SQLAlchemy select() object implicitly\ncreates an unnamed subquery when invoked, and the columns\nreturned are in reference to this subquery, not the SELECT\nstatement itself.   The usefulness of\nthis subquery is close to zero, whereas it confuses users\nwith its misleading behaviors,  complicates the internals,\nand is rejected by the two leading databases (PostgreSQL and\nMySQL) at the SQL level in any case, and as such it\u0027s going\naway most likely in SQLAlchemy 1.4, after\na short deprecation period that has yet to be announced in the 1.3\nseries.\n\nKeystone\u0027s schema-oriented unit tests appear to be applying\nthe select() construct to a Table object that\u0027s been reflected with\nautoload for the usually immediate purpose of iterating through\nthe columns of this Table and comparing them to a set of\ncomparison tuples, however the \".c.\" collection\nis available on all \"from clause\" objects of which Table is a\nmember so there is no need to apply a select() first.  In particular,\nthere is a reference to an internal\nSQLAlchemy API \"_proxies\" which is attempting to reconcile the\nfact that the implicitly created subquery columns don\u0027t refer\nto the original Table column\u0027s \"default\" parameter (there is in fact\na public API for this system as well, but it is not needed\nonce the select() is removed).\n\nThis patch removes the \"select()\" applied to the Table returned\nby select_table() and renames the method to load_table() to more\naccurately reflect what this method does.   The use of SQLAlchemy\u0027s\nprivate \"_proxies\" API can now be removed, and the two occurrences\nwhere the select() were actually used to invoke a SELECT\nstatement are replaced with explicit\nproduction of a select() construct as well as making use of the\nalready-present Session to invoke the query rather than using\nan out-of-band ad-hoc transaction (connectionless execution is\nalso going away by SQLAlchemy 2.0 in any case).\n\nChange-Id: Ica7037541a1305308ed743d8e04a3c2f02a2b811\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/48594eddeabdb79aa446a62ed390f9866b848fc9"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/48594eddeabdb79aa446a62ed390f9866b848fc9"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
