)]}'
{"id":"openstack%2Fkeystone~825376","triplet_id":"openstack%2Fkeystone~master~Iad41407e6ad1f9e2f33d228da914a302d4123ecc","project":"openstack/keystone","branch":"master","topic":"bp/remove-sqlalchemy-migrate","attention_set":{},"removed_from_attention_set":{"15334":{"account":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"last_update":"2022-02-04 22:56:25.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"Iad41407e6ad1f9e2f33d228da914a302d4123ecc","subject":"sql: Remove \u0027get_init_version\u0027","status":"MERGED","created":"2022-01-19 18:50:03.000000000","updated":"2022-02-04 23:01:02.000000000","submitted":"2022-02-04 22:56:25.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":"825376-bp/remove-sqlalchemy-migrate","meta_rev_id":"31468c75bf8582343f77ba0ea5a2482ed6b3b81c","_number":825376,"virtual_id_number":825376,"owner":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},{"value":0,"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":0,"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},{"value":0,"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2022-02-04 22:56:25.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":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"all":[{"value":2,"date":"2022-02-04 16:39:59.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},{"value":1,"date":"2022-02-04 16:38:56.000000000","permitted_voting_range":{"min":1,"max":2},"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":1,"date":"2022-02-04 16:38:13.000000000","permitted_voting_range":{"min":1,"max":2},"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},{"value":2,"date":"2022-02-04 16:28:41.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"]}],"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":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"all":[{"value":1,"date":"2022-02-04 16:39:59.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},{"value":0,"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"value":0,"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},{"value":0,"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"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":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2022-01-19 20:08:55.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":"CC"},{"updated":"2022-01-19 20:46:13.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":"2022-02-04 16:28:41.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":"2022-02-04 16:38:13.000000000","updated_by":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"reviewer":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"state":"REVIEWER"},{"updated":"2022-02-04 16:38:56.000000000","updated_by":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"reviewer":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"state":"REVIEWER"},{"updated":"2022-02-04 16:39:59.000000000","updated_by":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"reviewer":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"state":"REVIEWER"}],"messages":[{"id":"71b427cd336267ff4a3f2997d01964a82755b2c7","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"date":"2022-01-19 18:50:03.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"da977121e9e1ba625c7729ecee0081401b442843","tag":"autogenerated:zuul:check-arm64","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-01-19 20:08:55.000000000","message":"Patch Set 1:\n\nBuild succeeded (ARM64 pipeline).\n\n- openstack-tox-py38-arm64 https://zuul.opendev.org/t/openstack/build/6e4642e9ecec4d14886b837e09c862b4 : SUCCESS in 50m 51s (non-voting)\n- openstack-tox-py39-arm64 https://zuul.opendev.org/t/openstack/build/85f4f95605434f9f8eaddc7bd211b686 : TIMED_OUT in 1h 02m 34s (non-voting)","accounts_in_message":[],"_revision_number":1},{"id":"359ed7d6780f4f50a2da088575eee0ffd3af84a9","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-01-19 20:46:13.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-cover https://zuul.opendev.org/t/openstack/build/07309ff0113d468fbf6c4811b47a0029 : SUCCESS in 16m 38s\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/bf9be18ca02846969eb3a84e24115f7c : SUCCESS in 7m 56s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/984b5eabe1b645ba822e3c0a7f0f12ec : SUCCESS in 14m 07s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/3d47964c451447b1ab414575d0d96dfb : SUCCESS in 13m 40s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/fc0402bec17647d993624b8ff323c737 : SUCCESS in 13m 50s\n- grenade https://zuul.opendev.org/t/openstack/build/38394e6716fe4fd6a521231cf7ba4483 : SUCCESS in 1h 02m 49s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/a4114376d7804b76ad8adf393e425b76 : SUCCESS in 1h 33m 17s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/730f6ffdf3eb4beeb745e859e9834c61 : SUCCESS in 38m 12s\n- keystone-dsvm-py3-functional-fips https://zuul.opendev.org/t/openstack/build/60e23dbcb5c4473e93e6207ca62703e5 : SUCCESS in 46m 26s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal https://zuul.opendev.org/t/openstack/build/139b1d46a50c45959ab02bdd02355b5b : SUCCESS in 31m 16s (non-voting)\n- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k https://zuul.opendev.org/t/openstack/build/651271f3a52a46dc9b3a3097a0be79f6 : SUCCESS in 42m 20s\n- keystoneclient-devstack-functional https://zuul.opendev.org/t/openstack/build/3be026a03dc648e98186e6e91a6f2691 : SUCCESS in 19m 48s (non-voting)\n- keystone-dsvm-ldap-domain-specific-driver https://zuul.opendev.org/t/openstack/build/c2b2c596d27642a39c064aad3864e2a4 : SUCCESS in 58m 44s (non-voting)\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/78936c7419df46e4b63007e426a85f6c : SUCCESS in 56m 33s\n- keystone-protection-functional https://zuul.opendev.org/t/openstack/build/91508d9f3e0d4fc49d0ce59f606fb929 : SUCCESS in 43m 33s","accounts_in_message":[],"_revision_number":1},{"id":"715f97b81579e8369cd83094139bffb434100e7f","author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"date":"2022-02-04 16:28:41.000000000","message":"Patch Set 1: Code-Review+2","accounts_in_message":[],"_revision_number":1},{"id":"f0408a881b9c9c3ab52650fc9398bb25d4a9bc82","author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"date":"2022-02-04 16:38:13.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"b55742e12eebdb4e8e41c79a86fcbd5dac70f455","author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"date":"2022-02-04 16:38:56.000000000","message":"Patch Set 1: Code-Review+1","accounts_in_message":[],"_revision_number":1},{"id":"477bffc670a8ddb51e94679603e4cb80f9463abf","author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"date":"2022-02-04 16:39:59.000000000","message":"Patch Set 1: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":1},{"id":"82e462fd79e57a4c073df27bbe6882e3856649e9","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-02-04 16:41:32.000000000","message":"Patch Set 1: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"5238e81dbec0d97e336ff6d0053d91b2d405e24f","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-02-04 22:56:25.000000000","message":"Patch Set 1: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/79a32418149c4d068b13bc91268a039e : SUCCESS in 6m 26s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/87295e284b3d4bc1b3a418dd83fd05bc : SUCCESS in 26m 34s\n- openstack-tox-py38 https://zuul.opendev.org/t/openstack/build/21dd9850932b4c4ca7e0ec6f209dabcb : SUCCESS in 28m 30s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/3aa044882849432cb4658ce7419a541d : SUCCESS in 14m 04s\n- grenade https://zuul.opendev.org/t/openstack/build/6ef3ea621b314f11bd6868d2bb3c1543 : SUCCESS in 55m 08s\n- tempest-full-py3 https://zuul.opendev.org/t/openstack/build/db407e77f44c4cc6ad2cefe37c369734 : SUCCESS in 1h 37m 35s\n- keystone-dsvm-py3-functional https://zuul.opendev.org/t/openstack/build/a55ec4ff36d641d3b41efae11760f3b5 : SUCCESS in 28m 42s\n- keystone-dsvm-py3-functional-federation-ubuntu-focal-k2k https://zuul.opendev.org/t/openstack/build/fe7a9efca1714dd3839a391b8b41af4a : SUCCESS in 29m 24s\n- tempest-ipv6-only https://zuul.opendev.org/t/openstack/build/2e1c47cbef644ba6bfe534b609b28c62 : SUCCESS in 47m 17s\n- keystone-protection-functional https://zuul.opendev.org/t/openstack/build/0faef5a4f5014bbba6ba49fecb783afd : SUCCESS in 37m 58s","accounts_in_message":[],"_revision_number":1},{"id":"0f4294c2f89ed5de7ef55813799d7e97b2209c32","tag":"autogenerated:gerrit:merged","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-02-04 22:56:25.000000000","message":"Change has been successfully merged","accounts_in_message":[],"_revision_number":1},{"id":"31468c75bf8582343f77ba0ea5a2482ed6b3b81c","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2022-02-04 23:01:02.000000000","message":"Patch Set 1:\n\nBuild succeeded (promote pipeline).\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/d4b23442953c4e7b95e9575779e193e2 : SUCCESS in 1m 19s","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"06b47cbc8d29a7c3247518f2c6a6ab067b888d99","revisions":{"06b47cbc8d29a7c3247518f2c6a6ab067b888d99":{"kind":"REWORK","_number":1,"created":"2022-01-19 18:50:03.000000000","uploader":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"ref":"refs/changes/76/825376/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/keystone","ref":"refs/changes/76/825376/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/keystone refs/changes/76/825376/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/keystone refs/changes/76/825376/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/keystone refs/changes/76/825376/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/keystone refs/changes/76/825376/1"}}},"commit":{"parents":[{"commit":"837a55c3b590545c48d2daabe86a5ef0990ad463","subject":"Add generate schemas tool","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/837a55c3b590545c48d2daabe86a5ef0990ad463"}]}],"author":{"name":"Stephen Finucane","email":"stephenfin@redhat.com","date":"2022-01-18 18:12:17.000000000","tz":0},"committer":{"name":"Stephen Finucane","email":"stephenfin@redhat.com","date":"2022-01-19 16:58:16.000000000","tz":0},"subject":"sql: Remove \u0027get_init_version\u0027","message":"sql: Remove \u0027get_init_version\u0027\n\nInitializing and synchronizing the database are done using the same\n\u0027keystone-manage\u0027 command, \u0027db_sync\u0027. The bulk of this command is\nimplemented via \u0027_sync_repo\u0027 in \u0027keystone.common.sql.upgrades\u0027. This\ncalls two functions in \u0027oslo_db.sqlalchemy.migration\u0027:\n\u0027db_version_control\u0027, which would attempt to mark a database as version\ncontrolled (by creating the \u0027migrate_version\u0027 table in said database),\nfollowed by \u0027db_sync\u0027. We are passing an \u0027init_version\u0027 argument to the\nlatter, and this value is cleverly calculated (in the \u0027get_init_version\u0027\nhelper) by retrieving the lowest version found in a migration repository.\nAll of this seems well and good, but upon attempting to raise the\ninitial version (as part of the upcoming database migration squashing)\nwe start seeing errors like this:\n\n  oslo_db.exception.DBMigrationError: \"Database schema file with version\n  1 doesn\u0027t exist.\"\n\nIt turns out that the \u0027init_version\u0027 argument here is effectively\nuseless. The value in providing this argument to the oslo.db\u0027s\n\u0027db_sync\u0027 function is to allow it to optionally mark the database as\nversion controlled if necessary [1][2], or do what \u0027db_version_control\u0027\nis doing. However, none of the code to do this was being executed\nbecause we were already calling \u0027db_version_control\u0027 manually.\n\nThe minimal solution here would be pass an \u0027init_version\u0027 argument to\n\u0027db_version_control\u0027 instead, ensuring things are initialized with the\ncorrect initial version. However, since we \u0027db_sync\u0027 will do this for\nus, we choose instead to remove our invocation of \u0027db_version_control\u0027\nentirely and let \u0027db_sync\u0027 manage everything. We also go a step further\nand remove \u0027get_init_version\u0027. It\u0027s clever, but we won\u0027t be creating any\nnew SQLAlchemy-Migrate-based migrations so a simple constant would be\nmore than okay.\n\nChange-Id: Iad41407e6ad1f9e2f33d228da914a302d4123ecc\nSigned-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/06b47cbc8d29a7c3247518f2c6a6ab067b888d99"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/keystone/commit/06b47cbc8d29a7c3247518f2c6a6ab067b888d99"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"status":"CLOSED","labels":[{"label":"Verified","status":"OK","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"}},{"label":"Workflow","status":"OK","applied_by":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"}}]}],"submit_requirements":[{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Workflow\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Workflow\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dCustom-Rule"],"failing_atoms":[],"atom_explanations":{}}}]}
