)]}'
{"octavia/db/migration/alembic_migrations/versions/e37941b010db_add_lb_flavor_constraint.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6a3438310fb1724a6a5e536ffe95783569fd0d84","unresolved":true,"context_lines":[{"line_number":74,"context_line":"    flavors \u003d sql.table(u\u0027flavor\u0027, sa.Column(u\u0027id\u0027, sa.String(36)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    invalid_flavor_lbs \u003d sa.select([load_balancers.c.id]).select_from("},{"line_number":77,"context_line":"        load_balancers.outerjoin(flavors,"},{"line_number":78,"context_line":"                                 load_balancers.c.flavor_id \u003d\u003d flavors.c.id)"},{"line_number":79,"context_line":"    ).where(flavors.c.id is None).where(load_balancers.c.flavor_id is not None)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"8fffa406_e93a29d2","line":77,"range":{"start_line":77,"start_character":23,"end_line":77,"end_character":32},"updated":"2020-12-23 10:32:56.000000000","message":"This one would be tricky..\nI guess to make LEFT JOIN we need to switch to just \u0027join\u0027 here, as currently this migration got broken for MySQL\n\nERROR octavia-db-manage \u001b[01;35m\u001b[00msqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1093, \"You can\u0027t specify target table \u0027load_balancer\u0027 for update in FROM clause\")\nERROR octavia-db-manage \u001b[01;35m\u001b[00m[SQL: UPDATE load_balancer SET flavor_id\u003d%(flavor_id)s WHERE load_balancer.id IN (SELECT load_balancer.id \nERROR octavia-db-manage \u001b[01;35m\u001b[00mFROM load_balancer LEFT OUTER JOIN flavor ON load_balancer.flavor_id \u003d flavor.id","commit_id":"eaa136bfd8555bbba5c77cacc5e90c19a2def3a1"},{"author":{"_account_id":32871,"name":"Ksawery Dziekoński","email":"ksdziekonski@gmail.com","username":"ksdziekonski"},"change_message_id":"8953aea4d5139c3036cc3c0540bcd67d2d7f63dc","unresolved":true,"context_lines":[{"line_number":74,"context_line":"    flavors \u003d sql.table(u\u0027flavor\u0027, sa.Column(u\u0027id\u0027, sa.String(36)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    invalid_flavor_lbs \u003d sa.select([load_balancers.c.id]).select_from("},{"line_number":77,"context_line":"        load_balancers.outerjoin(flavors,"},{"line_number":78,"context_line":"                                 load_balancers.c.flavor_id \u003d\u003d flavors.c.id)"},{"line_number":79,"context_line":"    ).where(flavors.c.id is None).where(load_balancers.c.flavor_id is not None)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"b469c4d8_497ce6b7","line":77,"range":{"start_line":77,"start_character":23,"end_line":77,"end_character":32},"in_reply_to":"8fffa406_e93a29d2","updated":"2020-12-23 17:58:58.000000000","message":"There were a couple of issues with this query:\n- `is` and `is not` weren\u0027t properly translated to `__eq__` and `__ne__`, so those `WHERE` conditions never ended up in the compiled SQL statement; they were a result of trying to adhere to linting without double-checking the actual result\n- since the `load_balancer` table is used in the joining subquery, it required relabeling the resulting column to avoid confusing the database engine","commit_id":"eaa136bfd8555bbba5c77cacc5e90c19a2def3a1"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"eb6d7f17f00c579ab7f68279f516e30666c86a7c","unresolved":true,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # Make sure any existing load balancers with invalid flavor_id"},{"line_number":69,"context_line":"    # map to a valid flavor."},{"line_number":70,"context_line":"    # Note: constant is not used here to not trigger security tool errors."},{"line_number":71,"context_line":"    load_balancers \u003d sql.table(u\u0027load_balancer\u0027,"},{"line_number":72,"context_line":"                               sa.Column(u\u0027id\u0027, sa.String(36)),"},{"line_number":73,"context_line":"                               sa.Column(u\u0027flavor_id\u0027, sa.String(36)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9b046fa9_21e834a4","line":70,"updated":"2021-01-28 10:57:51.000000000","message":"So, now we switched to using a constant -- this note should go away? Does this no longer trigger security tool errors? Which security tool was this in reference to?","commit_id":"1809496e93d717dc3f5cf0e64e4c6cdc58e1a66e"},{"author":{"_account_id":32871,"name":"Ksawery Dziekoński","email":"ksdziekonski@gmail.com","username":"ksdziekonski"},"change_message_id":"590c5ece4328ad07cefd4796597d1c4ea3c14050","unresolved":true,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # Make sure any existing load balancers with invalid flavor_id"},{"line_number":69,"context_line":"    # map to a valid flavor."},{"line_number":70,"context_line":"    # Note: constant is not used here to not trigger security tool errors."},{"line_number":71,"context_line":"    load_balancers \u003d sql.table(u\u0027load_balancer\u0027,"},{"line_number":72,"context_line":"                               sa.Column(u\u0027id\u0027, sa.String(36)),"},{"line_number":73,"context_line":"                               sa.Column(u\u0027flavor_id\u0027, sa.String(36)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ae30e837_608ab76b","line":70,"in_reply_to":"9b046fa9_21e834a4","updated":"2021-01-28 14:32:05.000000000","message":"This note was introduced as part of https://review.opendev.org/c/openstack/octavia/+/692427/3..4 and build logs from that changeset are already gone.\n\nMy *guess*, based on my run-ins with Bandit in Openstack-Helm and Openstack-Helm-Infra recently, is that Michael may have wanted to use string parameterization in a raw SQL query, which under that assumption would flag that code as potentially SQLi-susceptible. Would like to hear from him, to be certain.\n\nDelegating this responsibility to SQLAlchemy should effectively invalidate it, so I\u0027ll remove it for now.","commit_id":"1809496e93d717dc3f5cf0e64e4c6cdc58e1a66e"}]}
