)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"486b21f3c04d0333bbeb4af4536ca54e5628084e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Case sensitivity problem in cinder scheduler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Volume creation fails when we use backend name which consists"},{"line_number":10,"context_line":"of same characters as the name used before but differenct upper/lower case."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"e.g."},{"line_number":13,"context_line":"1. configure \u0027lvm\u0027 as backend name and start cinder"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a1a9d01_9949658e","line":10,"updated":"2015-09-25 16:04:42.000000000","message":"differenct -\u003e different ?","commit_id":"69b840460198c76f189fabe771dbfd37f0cc5f4a"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"14005b287f6868ce39f09d9a138d2faf47c581b7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Case sensitivity problem in cinder scheduler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Volume creation fails when we use backend name which consists"},{"line_number":10,"context_line":"of same characters as the name used before but different upper/lower case."},{"line_number":11,"context_line":"It happens in mysql environment."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"e.g."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3a29b11f_2fccb234","line":10,"updated":"2015-10-18 10:57:54.000000000","message":"Subsequent lines should be wrapped at 72 characters.","commit_id":"267501bf68a4d598c02ae27b97d6064c5093175a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"98ae5e0feb927b0c0fb273a8a1f10e5c306dce73","unresolved":false,"context_lines":[{"line_number":18,"context_line":"for backend name."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When checking the existence of cinder-volume/backend"},{"line_number":21,"context_line":"to judge whether new cinder-volume service should be launched or not,"},{"line_number":22,"context_line":"the search-logic is case insensitive for backend name."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"On the other hand, when searching backend in create_volume processing,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3a29b11f_39cae71b","line":21,"updated":"2015-10-22 19:14:32.000000000","message":"It would be easier to understand if you\u0027ve rephrased that to something like:\n\n    to judge whether new cinder-volume service row in the DB should be created or not\n\nFormer is a little confusing, because service is de facto *launched* in either case.","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"a0c14123164d70a4fe8387cf6b05fe146ea41e5d","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"@require_admin_context"},{"line_number":412,"context_line":"def service_get_by_args(context, host, binary):"},{"line_number":413,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":414,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":415,"context_line":"        filter_by(binary\u003dbinary).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_3686e8b9","line":412,"updated":"2015-09-28 16:08:52.000000000","message":"I prefer to filter this in the DB side.\n\nE.g. something like:\n\nfrom sqlalchemy import func\nresults \u003d model_query(context, models.Service).\\\n \t        filter_by(func.lower(mosels.Service.host)\u003dfunc.lower(host)).\\\n \t        filter_by(binary\u003dbinary).\\\t\n \t        first()\n\nIt will work faster","commit_id":"fae11609d091ca4ab2a191a9aa56d6232644a617"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"55d562855b47ab282e6951399187b6eb604262df","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"@require_admin_context"},{"line_number":412,"context_line":"def service_get_by_args(context, host, binary):"},{"line_number":413,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":414,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":415,"context_line":"        filter_by(binary\u003dbinary).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_69654c1c","line":412,"in_reply_to":"9a1a9d01_09ce1082","updated":"2015-09-29 05:07:47.000000000","message":"Here is exception example.\n\n{0} cinder.tests.unit.test_db_api.DBAPIServiceTestCase.test_service_get_by_args [0.041001s] ... FAILED\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n      File \"cinder/tests/unit/test_db_api.py\", line 218, in test_service_get_by_args\n        service1 \u003d db.service_get_by_args(self.ctxt, \u0027host1\u0027, \u0027a\u0027)\n      File \"cinder/db/api.py\", line 120, in service_get_by_args\n        return IMPL.service_get_by_args(context, host, binary)\n      File \"cinder/db/sqlalchemy/api.py\", line 165, in wrapper\n        return f(*args, **kwargs)\n      File \"cinder/db/sqlalchemy/api.py\", line 415, in service_get_by_args\n        filter_by(binary\u003dbinary).\\\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2445, in first\n        ret \u003d list(self[0:1])\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2281, in __getitem__\n        return list(res)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2516, in __iter__\n        return self._execute_and_instances(context)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2531, in _execute_and_instances\n        result \u003d conn.execute(querycontext.statement, self._params)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 914, in execute\n        return meth(self, multiparams, params)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py\", line 323, in _execute_on_connection\n        return connection._execute_clauseelement(self, multiparams, params)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1010, in _execute_clauseelement\n        compiled_sql, distilled_params\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1146, in _execute_context\n        context)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1337, in _handle_dbapi_exception\n        util.raise_from_cause(newraise, exc_info)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py\", line 199, in raise_from_cause\n        reraise(type(exception), exception, tb\u003dexc_tb)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py\", line 1139, in _execute_context\n        context)\n      File \"/opt/stack/cinder/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py\", line 450, in do_execute\n        cursor.execute(statement, parameters)\n    sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such function: binary \n[SQL: u\u0027SELECT services.created_at AS services_created_at, services.updated_at AS services_updated_at, \nservices.deleted_at AS services_deleted_at, services.deleted AS services_deleted, services.id AS services_id, \nservices.host AS services_host, services.binary AS services_binary, services.topic AS services_topic, \nservices.report_count AS services_report_count, services.disabled AS services_disabled, services.availability_zone AS services_availability_zone, \nservices.disabled_reason AS services_disabled_reason, services.modified_at AS services_modified_at, \nservices.rpc_current_version AS services_rpc_current_version, services.rpc_available_version AS services_rpc_available_version, \nservices.object_current_version AS services_object_current_version, services.object_available_version AS services_object_available_version \n\\nFROM services \\nWHERE services.deleted \u003d 0 AND services.host \u003d binary(?) AND services.binary \u003d ?\\n LIMIT ? OFFSET ?\u0027] [parameters: (\u0027host1\u0027, \u0027a\u0027, 1, 0)]","commit_id":"fae11609d091ca4ab2a191a9aa56d6232644a617"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"3d73585bc39928f72ed70dfe15d9710733aca4fe","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"@require_admin_context"},{"line_number":412,"context_line":"def service_get_by_args(context, host, binary):"},{"line_number":413,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":414,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":415,"context_line":"        filter_by(binary\u003dbinary).\\"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_09ce1082","line":412,"in_reply_to":"9a1a9d01_3686e8b9","updated":"2015-09-29 04:45:06.000000000","message":"In the case of MySQL environment, \nwe can enable case-sentivity by following code.\nresult \u003d model_query(context, models.Service).\\\n                      filter_by(host\u003dfunc.binary(host).\\\n                      filter_by(binary).\\\n                      first()\n\n※ func.binary generates \u0027BINARY\u0027 option and it enables case-sensitivity in mysql.\n\nbut when we use this code in sqlite environment,\nexception was raised, because sqlite have no such option\n(And sqlite doesn\u0027t such option because it is originally case-sensitivity)\nActually, unit tests using sqlite were failed because of this exception.\n\nThat\u0027s why I think solution by fixing query will need db-service-awareness and I concern this impl produces new bug.\nI think solution by adding if-condition of python is easier and safer.\nWhat do you think?","commit_id":"fae11609d091ca4ab2a191a9aa56d6232644a617"},{"author":{"_account_id":14274,"name":"XinXiaohui","email":"xiaohui.xin@intel.com","username":"XinXiaohui"},"change_message_id":"6a06b6db014f453496c24624fd67ade178083c4e","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"},{"line_number":424,"context_line":"            return result"},{"line_number":425,"context_line":"    else:"},{"line_number":426,"context_line":"        raise exception.HostBinaryNotFound(host\u003dhost, binary\u003dbinary)"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"@require_admin_context"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a2ca52d_6b552af8","line":426,"updated":"2015-10-16 03:21:15.000000000","message":"May you remove the else and just raise the exception? It looks the \"else:\" is redundant.","commit_id":"402f22c32dd2e208a9383c69193abee4b94c2fe8"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"98891bc49c2e768d30f85ccdadecf5b5aab996a2","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    if not results:"},{"line_number":420,"context_line":"        raise exception.HostBinaryNotFound(host\u003dhost, binary\u003dbinary)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    for result in results:"},{"line_number":423,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_f9f1cf01","line":420,"updated":"2015-10-22 19:11:01.000000000","message":"I think you don\u0027t need lines 420-421. If all() returns empty list, then it will jump directly to line 426.","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"cc62f15170eeab113cd2ea2ca2ee3894c6a78695","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":415,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":416,"context_line":"        filter_by(binary\u003dbinary).\\"},{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    for result in results:"},{"line_number":420,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_80e2549e","line":417,"updated":"2015-11-03 15:54:44.000000000","message":"So the filter_by is case insensitive.  This just changes to a get \"all\" of the results and then do your own iteration and compare here?\n\nThat seems like it would work, but I am concerned about whether or not there other places that we have this sort of problem that we\u0027re missing because we don\u0027t do something different with filter_by?","commit_id":"d75d04ec55f906de5f90d186881bac25688a906b"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"de771e5ed1fa876cff2bcec63ae0303a858900f1","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":415,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":416,"context_line":"        filter_by(binary\u003dbinary).\\"},{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    for result in results:"},{"line_number":420,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_8b96853d","line":417,"in_reply_to":"fa80f949_28819fc3","updated":"2015-11-06 00:24:36.000000000","message":"Is your concern processing time in this search or burden for db?\nIf former, I think small problem is because this function is not called in operations except for launching and removing cinder-xxx services.","commit_id":"d75d04ec55f906de5f90d186881bac25688a906b"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"7d0df01740acf8017057d5f10831665c9b83d36c","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":415,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":416,"context_line":"        filter_by(binary\u003dbinary).\\"},{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    for result in results:"},{"line_number":420,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_28819fc3","line":417,"in_reply_to":"fa80f949_7d04a77d","updated":"2015-11-05 23:52:33.000000000","message":"This is also going to pull a lot more data out of the database, just to throw all but the first entry it finds away. :(","commit_id":"d75d04ec55f906de5f90d186881bac25688a906b"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"3ac057834b2f7f11846e0264606e0f64042e0d42","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":415,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":416,"context_line":"        filter_by(binary\u003dbinary).\\"},{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    for result in results:"},{"line_number":420,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_7d04a77d","line":417,"in_reply_to":"fa80f949_80e2549e","updated":"2015-11-04 01:18:43.000000000","message":"\u003eThis just changes to a get \"all\" ...\n\nYes. After getting filtered results by case-insensitive search (if db is so) with specified keyword, it iterates and compares with python code(this is case sensitive).\n\n\u003e I am concerned about whether or not there other places that ..\n\nExcuse me. Your concern point is whether other places have same problem or not, right? If so, sorry, I\u0027m not sure... As far as I know, this problem happens only in this place.","commit_id":"d75d04ec55f906de5f90d186881bac25688a906b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ef39d75c12895fddd85a06502aa4c34ca05f3c85","unresolved":false,"context_lines":[{"line_number":414,"context_line":"    results \u003d model_query(context, models.Service).\\"},{"line_number":415,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":416,"context_line":"        filter_by(binary\u003dbinary).\\"},{"line_number":417,"context_line":"        all()"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    for result in results:"},{"line_number":420,"context_line":"        if host \u003d\u003d result[\u0027host\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_d0898e76","line":417,"in_reply_to":"fa80f949_8b96853d","updated":"2015-11-06 09:12:03.000000000","message":"Actually its\u0027 launching, removing and updating (disabling). But yes, that\u0027s true - this doesn\u0027t seem like a big performance issue and I don\u0027t think we have other idea than filtering in Python code to achieve consistent behavior between different database backends.","commit_id":"d75d04ec55f906de5f90d186881bac25688a906b"}],"cinder/tests/unit/test_db_api.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"98891bc49c2e768d30f85ccdadecf5b5aab996a2","unresolved":false,"context_lines":[{"line_number":235,"context_line":""},{"line_number":236,"context_line":"            def filter_by(self, **kwargs):"},{"line_number":237,"context_line":"                ret \u003d mock.Mock()"},{"line_number":238,"context_line":"                ret.first \u003d mock.Mock()"},{"line_number":239,"context_line":"                ret.all \u003d mock.Mock()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                results \u003d []"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_d9f6538e","line":238,"updated":"2015-10-22 19:11:01.000000000","message":"I think you don\u0027t need to mock first().","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"98891bc49c2e768d30f85ccdadecf5b5aab996a2","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                ret.first \u003d mock.Mock()"},{"line_number":239,"context_line":"                ret.all \u003d mock.Mock()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                results \u003d []"},{"line_number":242,"context_line":"                for record in self.records:"},{"line_number":243,"context_line":"                    for key, value in kwargs.items():"},{"line_number":244,"context_line":"                        if record[key].lower() !\u003d value.lower():"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_791fffb6","line":241,"updated":"2015-10-22 19:11:01.000000000","message":"Do we actually need whole logic here? According to what\u0027s in lines 259-260 this filter may simply return everything.","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3d4ec31789344fce5b7864d61f86a7c1e509d45a","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                ret.first \u003d mock.Mock()"},{"line_number":239,"context_line":"                ret.all \u003d mock.Mock()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                results \u003d []"},{"line_number":242,"context_line":"                for record in self.records:"},{"line_number":243,"context_line":"                    for key, value in kwargs.items():"},{"line_number":244,"context_line":"                        if record[key].lower() !\u003d value.lower():"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_cb7aeb76","line":241,"in_reply_to":"3a29b11f_2d9b7e19","updated":"2015-11-03 17:26:19.000000000","message":"Okay, I understand that now. My concern was that you have lines:\n\n        service1 \u003d db.service_get_by_args(self.ctxt, \u0027host\u0027, \u0027a\u0027)\n        self._assertEqualObjects(services[0], service1)\n\n        service2 \u003d db.service_get_by_args(self.ctxt, \u0027HOST\u0027, \u0027a\u0027)\n        self._assertEqualObjects(services[1], service2)\n\nIn these cases filter returns both HOST and host, so everything from the DB. I haven\u0027t noticed that then you have a check:\n\n        self.assertRaises(exception.HostBinaryNotFound,\n                          db.service_get_by_args,\n                          self.ctxt, \u0027Host\u0027, \u0027a\u0027)\n\nIn this one you actually need the logic. Summing up - you\u0027re right. :)","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"},{"author":{"_account_id":10674,"name":"Yusuke Hayashi","email":"yusuke.hayashi.710@gmail.com","username":"YusukeHayashi"},"change_message_id":"7923c4e798e4819734b1d4c1f6f58e5de34ac626","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                ret.first \u003d mock.Mock()"},{"line_number":239,"context_line":"                ret.all \u003d mock.Mock()"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                results \u003d []"},{"line_number":242,"context_line":"                for record in self.records:"},{"line_number":243,"context_line":"                    for key, value in kwargs.items():"},{"line_number":244,"context_line":"                        if record[key].lower() !\u003d value.lower():"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_2d9b7e19","line":241,"in_reply_to":"3a29b11f_791fffb6","updated":"2015-10-22 23:36:37.000000000","message":"Excuse me, I did not undestand your question point..\n\nThis function imitates case-insensitive db search such as mysql.\n\nIf input for function is {\u0027host\u0027: \u0027dummy\u0027}, then results will be []\n\nIf input for function is {\u0027host\u0027: \u0027host\u0027}, then results will be [\u0027host\u0027, \u0027HOST\u0027}\n\nSo, I need the imitate logic in this patch...\nIs my answer what you knew ? If not so, please let me know, thanks.","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"98891bc49c2e768d30f85ccdadecf5b5aab996a2","unresolved":false,"context_lines":[{"line_number":248,"context_line":""},{"line_number":249,"context_line":"                ret.filter_by \u003d case_insensitive_filter(results).filter_by"},{"line_number":250,"context_line":"                ret.all.return_value \u003d results"},{"line_number":251,"context_line":"                if len(results) \u003e 0:"},{"line_number":252,"context_line":"                    ret.first.return_value \u003d results[0]"},{"line_number":253,"context_line":"                else:"},{"line_number":254,"context_line":"                    ret.first.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a29b11f_5931e358","line":251,"updated":"2015-10-22 19:11:01.000000000","message":"As you don\u0027t need to mock first() you can remove lines 251-254 as well.","commit_id":"c4384295327e8c2e146ab48c28a09f3b41516d41"}]}
