)]}'
{"mistral/engine/engine_server.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self._expiration_policy_tg.stop()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            if graceful:"},{"line_number":82,"context_line":"                self._expiration_policy_tg.wait()"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if self._rpc_server:"},{"line_number":85,"context_line":"            self._rpc_server.stop(graceful)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3fb8be74","line":82,"range":{"start_line":82,"start_character":15,"end_line":82,"end_character":49},"updated":"2016-11-29 11:32:32.000000000","message":"IMO there should be some timeout for this operation. Or maybe there is a timeout for whole \u0027stop\u0027 method?","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self._expiration_policy_tg.stop()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            if graceful:"},{"line_number":82,"context_line":"                self._expiration_policy_tg.wait()"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if self._rpc_server:"},{"line_number":85,"context_line":"            self._rpc_server.stop(graceful)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_0e3d8ddc","line":82,"range":{"start_line":82,"start_character":15,"end_line":82,"end_character":49},"in_reply_to":"5a74a57a_3fb8be74","updated":"2016-11-30 06:37:54.000000000","message":"ThreadGroup.stop() actually has \u0027graceful\u0027 parameter, I missed it. As far as timeout, it doesn\u0027t provide a way to specify it. If we call ThreadGroup.stop() then all threads under this group should end sooner or later if they are implemented correctly. The only problem in our case maybe if our method in expiration policy that runs in a loop will hang for unlimited time. But I think it should be considered an implementation error (similar to RuntimeError) and thus it doesn\u0027t make a lot of sense to mask it with using timeout.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            \" execution_id\u003d%s]\" % (rpc_ctx, execution_id)"},{"line_number":244,"context_line":"        )"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        return self.engine.resume_workflow(execution_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"def get_oslo_service(setup_profiler\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3f6b5db8","line":246,"range":{"start_line":246,"start_character":27,"end_line":246,"end_character":42},"updated":"2016-11-29 11:32:32.000000000","message":"Why \u0027rollback_workflow\u0027 method resumes workflow execution?","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            \" execution_id\u003d%s]\" % (rpc_ctx, execution_id)"},{"line_number":244,"context_line":"        )"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        return self.engine.resume_workflow(execution_id)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"def get_oslo_service(setup_profiler\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_ce1d5574","line":246,"range":{"start_line":246,"start_character":27,"end_line":246,"end_character":42},"in_reply_to":"5a74a57a_3f6b5db8","updated":"2016-11-30 06:37:54.000000000","message":"Woow, good catch. In fact, this is a copy paste from rpc.py so it existed for a long time.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"}],"mistral/engine/rpc_backend/kombu/kombu_server.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        except socket.error as e:"},{"line_number":99,"context_line":"            raise exc.MistralException(\"Broker connection failed: %s\" % e)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def stop(self, graceful\u003dFalse):"},{"line_number":102,"context_line":"        self._running.clear()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_1fea2174","line":101,"range":{"start_line":101,"start_character":19,"end_line":101,"end_character":35},"updated":"2016-11-29 11:32:32.000000000","message":"Please use this parameter in a same way as in oslo_server implementation of \u0027stop\u0027.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        except socket.error as e:"},{"line_number":99,"context_line":"            raise exc.MistralException(\"Broker connection failed: %s\" % e)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def stop(self, graceful\u003dFalse):"},{"line_number":102,"context_line":"        self._running.clear()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_bb80348d","line":101,"range":{"start_line":101,"start_character":19,"end_line":101,"end_character":35},"in_reply_to":"5a74a57a_1fea2174","updated":"2016-11-30 06:37:54.000000000","message":"I don\u0027t understand what you mean. In oslo_server we use method wait() of MessageHandlingServer class. Here we don\u0027t have anything similar. And _running is just an instance of Event.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self._running.clear()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def wait(self):"},{"line_number":105,"context_line":"        # TODO(rakhmerov): Implement. We can\u0027t call self._running.wait()"},{"line_number":106,"context_line":"        # because it\u0027s the opposite to what we need."},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _get_rpc_method(self, method_name):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_1f85c1cd","line":106,"range":{"start_line":105,"start_character":8,"end_line":106,"end_character":52},"updated":"2016-11-29 11:32:32.000000000","message":"Due to the current implementation it should be enough to make this function sleep for 1 second. Also we can use some locking mechanism in \u0027run\u0027 method and then try to acquire same lock here - so that method \u0027wait\u0027 would really wait till the server stops.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        self._running.clear()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def wait(self):"},{"line_number":105,"context_line":"        # TODO(rakhmerov): Implement. We can\u0027t call self._running.wait()"},{"line_number":106,"context_line":"        # because it\u0027s the opposite to what we need."},{"line_number":107,"context_line":"        pass"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _get_rpc_method(self, method_name):"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_1b4e8896","line":106,"range":{"start_line":105,"start_character":8,"end_line":106,"end_character":52},"in_reply_to":"5a74a57a_1f85c1cd","updated":"2016-11-30 06:37:54.000000000","message":"Let\u0027s not use sleep please :)\n\nThe idea with locks sounds ok.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"8249c7741614a1e0fd210ca140af407a4fc5939a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.channel \u003d None"},{"line_number":48,"context_line":"        self.conn \u003d None"},{"line_number":49,"context_line":"        self._running \u003d threading.Event()"},{"line_number":50,"context_line":"        self._stopped \u003d threading.Event()"},{"line_number":51,"context_line":"        self.endpoints \u003d []"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a74a57a_6e308f9f","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":41},"updated":"2016-11-30 10:00:57.000000000","message":"Shouldn\u0027t we clear this at the beginning of \u0027run\u0027 method? I\u0027m not sure if this object may be stopped and the run again, but if so we surely need to clear it.","commit_id":"efdd06d2c89d67c8f400b1819d448af957dbdb36"}],"mistral/engine/rpc_backend/rpc.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    _EVENT_ENGINE_CLIENT \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# TODO(rakhmerov): This method seems misplaced. Now we have different kind"},{"line_number":56,"context_line":"# of transports (oslo, kombu) and this module should not have any oslo"},{"line_number":57,"context_line":"# specific things anymore."},{"line_number":58,"context_line":"def get_transport():"},{"line_number":59,"context_line":"    global _TRANSPORT"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3fb35d99","line":57,"range":{"start_line":55,"start_character":0,"end_line":57,"end_character":26},"updated":"2016-11-29 11:32:32.000000000","message":"Agree. But this can be very difficult since this method is also used in various places outside the oslo_server/client files.\n\nWhat is more, it is really important that it got run on startup since it loads/initializes rpc-related flags in config.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"}],"mistral/service/base.py":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"ccead9c6b65e9fe4152ad62fdd1e7ddbfb6e6427","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._started.wait()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _notify_started(self, message):"},{"line_number":43,"context_line":"        print(message)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self._started.send()"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5a74a57a_a44da3c5","line":43,"updated":"2016-11-29 10:41:55.000000000","message":"print statement","commit_id":"532f1b438e289b93d91f71c7bafb0ae1041ed941"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b086d7d3ba398261d470157c704c08f8fef7f9d3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._started.wait()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _notify_started(self, message):"},{"line_number":43,"context_line":"        print(message)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self._started.send()"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5a74a57a_e4331b12","line":43,"in_reply_to":"5a74a57a_a44da3c5","updated":"2016-11-29 10:45:45.000000000","message":"It\u0027s intentional. The idea is to always print that the service is started to std.out so that it works with any config settings. It actually already existed but in cmd/launch.py","commit_id":"532f1b438e289b93d91f71c7bafb0ae1041ed941"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Huawei Technologies Co., Ltd."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#    you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_ff10055b","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":23},"updated":"2016-11-29 11:32:32.000000000","message":"Huawei?","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Huawei Technologies Co., Ltd."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"#    you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_3b43446e","line":1,"range":{"start_line":1,"start_character":17,"end_line":1,"end_character":23},"in_reply_to":"5a74a57a_ff10055b","updated":"2016-11-30 06:37:54.000000000","message":"Yeah, sorry. Copy paste.","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # executor and engine servers."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # TODO(rakhmerov): This method is not implemented correctly now"},{"line_number":62,"context_line":"        # (not thread-safe). Uncomment this call once it\u0027s fixed."},{"line_number":63,"context_line":"        # self.cluster_member.stop()"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_824a5653","line":62,"range":{"start_line":62,"start_character":11,"end_line":62,"end_character":26},"updated":"2016-11-29 11:32:32.000000000","message":"Could you elaborate why it is not thread-safe?","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # executor and engine servers."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # TODO(rakhmerov): This method is not implemented correctly now"},{"line_number":62,"context_line":"        # (not thread-safe). Uncomment this call once it\u0027s fixed."},{"line_number":63,"context_line":"        # self.cluster_member.stop()"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_d6478749","line":62,"range":{"start_line":62,"start_character":11,"end_line":62,"end_character":26},"in_reply_to":"5a74a57a_824a5653","updated":"2016-11-30 06:37:54.000000000","message":"It\u0027s both Look at its implementation. It always gets a service coordinator and if it\u0027s active it calls stop for it. This is wrong because we one service coordinator is supposed to be used for many services, it\u0027s a singleton. What if another service is starting at the same time. It may change is_active() to True then the one that is stopping it will make it False and from the one that is starting the state of service coordinator will be invalid (not active instead of active).","commit_id":"601df24fc86179737e9684edd5da0aa20977d627"}],"mistral/tests/unit/engine/test_task_defaults.py":[{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"c9c08d0bf9603dfc776f16a3a264c5f6d16c4ed9","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(TaskDefaultsReverseWorkflowEngineTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        thread_group \u003d scheduler.setup()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.addCleanup(thread_group.stop)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_02400606","side":"PARENT","line":89,"range":{"start_line":89,"start_character":8,"end_line":89,"end_character":40},"updated":"2016-11-29 11:32:32.000000000","message":"Since this got deleted, where scheduler setup is taking place?","commit_id":"196ee5a7af3d7a33b9397e83178acad0f10f8c4c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fc9b8d197df93cf10844a2ba68234f4f2bf7b21d","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def setUp(self):"},{"line_number":87,"context_line":"        super(TaskDefaultsReverseWorkflowEngineTest, self).setUp()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        thread_group \u003d scheduler.setup()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self.addCleanup(thread_group.stop)"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5a74a57a_d6e30732","side":"PARENT","line":89,"range":{"start_line":89,"start_character":8,"end_line":89,"end_character":40},"in_reply_to":"5a74a57a_02400606","updated":"2016-11-30 06:37:54.000000000","message":"In EngineService which is started in base.EngineTestCase class. Scheduler setup is not encapsulated inside engine. In fact, scheduler is not needed by other components (executor, api) but engine.","commit_id":"196ee5a7af3d7a33b9397e83178acad0f10f8c4c"}]}
