)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"9d68a0727e5580ebd02d6c94f6374a052d7b0d3e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Limit image type function resources by using customized cpu/mem saved"},{"line_number":10,"context_line":"in function database. And this patch is based on patch [0]."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[0]: https://review.openstack.org/#/c/563457/"},{"line_number":13,"context_line":"Story: 2001586"},{"line_number":14,"context_line":"Task: 14415"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f6a8fd7_5516e9a9","line":12,"updated":"2018-04-26 08:10:52.000000000","message":"Just an FYI, you can also use the Change-Id of that commit.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"4bfb37311b4c1daeea34f4ced826df026740a749","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Limit image type function resources by using customized cpu/mem saved"},{"line_number":10,"context_line":"in function database. And this patch is based on patch [0]."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"[0]: https://review.openstack.org/#/c/563457/"},{"line_number":13,"context_line":"Story: 2001586"},{"line_number":14,"context_line":"Task: 14415"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f6a8fd7_f5d7fdbd","line":12,"in_reply_to":"9f6a8fd7_5516e9a9","updated":"2018-04-26 09:25:51.000000000","message":"ok","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"}],"qinling/engine/default_engine.py":[{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"993bced21ebdfacae46df710960906580b2af186","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            _, svc_url \u003d self.orchestrator.prepare_execution("},{"line_number":191,"context_line":"                function_id,"},{"line_number":192,"context_line":"                function_version,"},{"line_number":193,"context_line":"                rlimit\u003drlimit if image else None,"},{"line_number":194,"context_line":"                image\u003dimage,"},{"line_number":195,"context_line":"                identifier\u003didentifier,"},{"line_number":196,"context_line":"                labels\u003dlabels,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_28ba7309","line":193,"range":{"start_line":193,"start_character":33,"end_line":193,"end_character":38},"updated":"2018-05-10 04:22:31.000000000","message":"No need to check if image  is none or not, just pass through because we will need this param in future anyway.","commit_id":"70174a57fd7e582460e5fd06cd4b928afff234e5"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"b0c862de111c943266de9331a18665eab20d0896","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            _, svc_url \u003d self.orchestrator.prepare_execution("},{"line_number":191,"context_line":"                function_id,"},{"line_number":192,"context_line":"                function_version,"},{"line_number":193,"context_line":"                rlimit\u003drlimit if image else None,"},{"line_number":194,"context_line":"                image\u003dimage,"},{"line_number":195,"context_line":"                identifier\u003didentifier,"},{"line_number":196,"context_line":"                labels\u003dlabels,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_ebe315d8","line":193,"range":{"start_line":193,"start_character":33,"end_line":193,"end_character":38},"in_reply_to":"5f7c97a3_28ba7309","updated":"2018-05-10 06:39:06.000000000","message":"Do you mean ``prepare_execution()`` may be updated in the future? Because I found that in current ``prepare_execution()``, param \u0027rlimit\u0027 will never be used for non-image function.","commit_id":"70174a57fd7e582460e5fd06cd4b928afff234e5"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"764dcb911653544094c4070ee500436e393070e7","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            _, svc_url \u003d self.orchestrator.prepare_execution("},{"line_number":191,"context_line":"                function_id,"},{"line_number":192,"context_line":"                function_version,"},{"line_number":193,"context_line":"                rlimit\u003drlimit if image else None,"},{"line_number":194,"context_line":"                image\u003dimage,"},{"line_number":195,"context_line":"                identifier\u003didentifier,"},{"line_number":196,"context_line":"                labels\u003dlabels,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_6ee5d308","line":193,"range":{"start_line":193,"start_character":33,"end_line":193,"end_character":38},"in_reply_to":"5f7c97a3_2e303be8","updated":"2018-05-10 07:35:03.000000000","message":"ok, done.","commit_id":"70174a57fd7e582460e5fd06cd4b928afff234e5"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"698b1dc115d66b2ef7956135503d577e6874c96c","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            _, svc_url \u003d self.orchestrator.prepare_execution("},{"line_number":191,"context_line":"                function_id,"},{"line_number":192,"context_line":"                function_version,"},{"line_number":193,"context_line":"                rlimit\u003drlimit if image else None,"},{"line_number":194,"context_line":"                image\u003dimage,"},{"line_number":195,"context_line":"                identifier\u003didentifier,"},{"line_number":196,"context_line":"                labels\u003dlabels,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_2e303be8","line":193,"range":{"start_line":193,"start_character":33,"end_line":193,"end_character":38},"in_reply_to":"5f7c97a3_ebe315d8","updated":"2018-05-10 07:12:03.000000000","message":"just leave `rlimit\u003drlimit` instead of `rlimit\u003drlimit if image else None`. It won\u0027t affect the following logic if it\u0027s not image type function, and we may need it for non-image type function in future.","commit_id":"70174a57fd7e582460e5fd06cd4b928afff234e5"}],"qinling/orchestrator/kubernetes/manager.py":[{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"9d68a0727e5580ebd02d6c94f6374a052d7b0d3e","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        else:"},{"line_number":334,"context_line":"            input_list \u003d list(json.loads(input))"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        cpu_str \u003d str(rlimit[\u0027cpu\u0027]) + \u0027m\u0027"},{"line_number":337,"context_line":"        memory_str \u003d str(rlimit[\u0027memory_size\u0027])"},{"line_number":338,"context_line":"        pod_body \u003d self.pod_template.render("},{"line_number":339,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_1582b100","line":336,"updated":"2018-04-26 08:10:52.000000000","message":"What about to put the extra \u0027m\u0027 in the template then we don\u0027t have to do the type casting here? So that we can use only integers internally.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"4bfb37311b4c1daeea34f4ced826df026740a749","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        else:"},{"line_number":334,"context_line":"            input_list \u003d list(json.loads(input))"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        cpu_str \u003d str(rlimit[\u0027cpu\u0027]) + \u0027m\u0027"},{"line_number":337,"context_line":"        memory_str \u003d str(rlimit[\u0027memory_size\u0027])"},{"line_number":338,"context_line":"        pod_body \u003d self.pod_template.render("},{"line_number":339,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_f585bdad","line":336,"in_reply_to":"9f6a8fd7_1582b100","updated":"2018-04-26 09:25:51.000000000","message":"ok, I\u0027ll have a try.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"eb87bc3b0c4d9c35d3edfe72ed40c27c3df9533c","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        return pod_labels"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def prepare_execution(self, function_id, version, rlimit, image\u003dNone,"},{"line_number":379,"context_line":"                          identifier\u003dNone, labels\u003dNone, input\u003dNone):"},{"line_number":380,"context_line":"        \"\"\"Prepare service URL for function version."},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_bce9201b","line":378,"range":{"start_line":378,"start_character":54,"end_line":378,"end_character":60},"updated":"2018-05-08 05:30:10.000000000","message":"could you please define this param as part of kwargs? and don\u0027t forget to define the param in the abstraction layer(`qinling.orchestrator.base.OrchestratorBase`)","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"3376e00fc66fc7bfab3ff0c41ed833ef785c770a","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        return pod_labels"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def prepare_execution(self, function_id, version, rlimit, image\u003dNone,"},{"line_number":379,"context_line":"                          identifier\u003dNone, labels\u003dNone, input\u003dNone):"},{"line_number":380,"context_line":"        \"\"\"Prepare service URL for function version."},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2abda2d7","line":378,"range":{"start_line":378,"start_character":54,"end_line":378,"end_character":60},"in_reply_to":"5f7c97a3_bce9201b","updated":"2018-05-09 09:42:50.000000000","message":"ok.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"}],"qinling/utils/executions.py":[{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"9d68a0727e5580ebd02d6c94f6374a052d7b0d3e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_7530cd56","line":124,"updated":"2018-04-26 08:10:52.000000000","message":"These checks should be done before we call _update_function_db()/_update_function_version_db(), or we may go into the situation that the function count is increased but no execution is created (in the database).","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"3376e00fc66fc7bfab3ff0c41ed833ef785c770a","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_6a4b9a58","line":124,"in_reply_to":"5f7c97a3_1c69348a","updated":"2018-05-09 09:42:50.000000000","message":"So, we don\u0027t need to check function\u0027s resource limits any more when executing this function?","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"72fa351d7dddf24e1bd1a76179de47bd5bd29c0f","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_543d0ac2","line":124,"in_reply_to":"5f7c97a3_2da29caf","updated":"2018-05-10 09:15:29.000000000","message":"Agree. We just need a comment in the configurations about the limits are in fact only checked upon creation.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"158494fd00b714bf0625109ce6f199546d5e7f9a","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2da29caf","line":124,"in_reply_to":"5f7c97a3_6a4b9a58","updated":"2018-05-09 10:31:32.000000000","message":"Yeah, that\u0027s what I thought, we already check the limit when creating and updating the function, in other words, the limit range configuration only restrict new functions. But I\u0027d like to know Hunt\u0027s option on this.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"82627ad2b3ea2103e520ddae0923a7460adda022","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_173f1488","line":124,"in_reply_to":"9f6a8fd7_0ba37201","updated":"2018-04-26 10:15:41.000000000","message":"No I didn\u0027t think of the mark-and-check part. I was just thinking about dropping a WARN message to notify the deployer. Or even fail to start without ensuring that all the limit settings of functions are in the range specified in the config. For the on-the-fly config reloading, same checks should also be performed when reloading. I think this can be discussed in the future.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"00df0fe2de2fb59d73936f6adea05b7107270345","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_daac61f0","line":124,"in_reply_to":"9f6a8fd7_173f1488","updated":"2018-04-26 10:59:00.000000000","message":"If just a WARN message to the deployer, then who will update the value to fit the new config range?","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"4bfb37311b4c1daeea34f4ced826df026740a749","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_0ba37201","line":124,"in_reply_to":"9f6a8fd7_55334914","updated":"2018-04-26 09:25:51.000000000","message":"According to your thoughts, we will need to check all of the functions db once qinling restart, then need to mark these functions whose cpu/mem values are out of the new range, and when executing the function we need to check the mark here too because we cannot make sure that whether users have updated their functions to fit the new range in time.\n\nI think it is a little bit complex and when we support to load config file dynamically in the future, the check here may be more suitable than check when server restarts.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":21781,"name":"Hunt Xu","email":"mhuntxu@gmail.com","username":"huntxu"},"change_message_id":"4826b347eee300a58410954038e9ac83b4aa19a9","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_55334914","line":124,"in_reply_to":"9f6a8fd7_7530cd56","updated":"2018-04-26 08:25:09.000000000","message":"And it seems to be not very optimal to do the checks every time an execution is created as most of the time the checks are in fact not needed. Although I\u0027m fine with this if it is necessary.\n\nAs qinling now cannot reload the configurations during running, which means that configuration update can only take effect with a restart. How about to only check the function resource limit settings during starting qinling, and give a WARN message if the setting is out of the range specified in the updated config. Thoughts?","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":27695,"name":"Jiangyuan","email":"yuango.jiang@gmail.com","username":"jyuan"},"change_message_id":"4bfb37311b4c1daeea34f4ced826df026740a749","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_9557a126","line":124,"in_reply_to":"9f6a8fd7_7530cd56","updated":"2018-04-26 09:25:51.000000000","message":"Yes, thanks.","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"eb87bc3b0c4d9c35d3edfe72ed40c27c3df9533c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    common.validate_int_in_range("},{"line_number":122,"context_line":"        \u0027memory\u0027, memory_size, cfg.CONF.resource_limits.min_memory,"},{"line_number":123,"context_line":"        cfg.CONF.resource_limits.max_memory"},{"line_number":124,"context_line":"    )"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    params.update({\u0027status\u0027: status.RUNNING})"},{"line_number":127,"context_line":"    db_model \u003d db_api.create_execution(params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_1c69348a","line":124,"in_reply_to":"9f6a8fd7_daac61f0","updated":"2018-05-08 05:30:10.000000000","message":"hi, all, to make the implementation simpler, i think we put an appropriate help message in the config option to remind the operators that it may be inconsistent between the config and the existing function definition.\n\nand IMO, the configuration change should not affect existing functions, which means, the function execution may eat more resources than that\u0027s configured.\n\nSounds a plan?","commit_id":"6e1705d36c6bb610cd5b14cafe73c7b3a8338b96"}]}
