)]}'
{"glance/api/common.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"50ace347c1227f51ff4610c573a1635ce045e099","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    @param lock_name:  Name of the lock."},{"line_number":208,"context_line":"    @param size: Size of pool."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @return: glance.async_.ThreadPoolModel"},{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    @memoize(lock_name)"},{"line_number":213,"context_line":"    def _get_thread_pool():"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_e639b2cf","line":210,"range":{"start_line":210,"start_character":13,"end_line":210,"end_character":42},"updated":"2020-07-22 00:53:40.000000000","message":"Apparently docs build will fail because it thinks glance.async is a thing, stopping at the underscore or something. I guess I need to make this not look like a python reference.","commit_id":"f112f9e2e300fdcaa3415ec8bf0cb1c06b6fbdbd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbdbc895e0db31ede3257849d6f034e2a7783197","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    @memoize(lock_name)"},{"line_number":224,"context_line":"    def _get_thread_pool():"},{"line_number":225,"context_line":"        threadpool_cls \u003d glance.async_.get_threadpool_model()"},{"line_number":226,"context_line":"        LOG.debug(\u0027Initializing named threadpool %r\u0027, lock_name)"},{"line_number":227,"context_line":"        return threadpool_cls(size)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    return _get_thread_pool"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_5deb4baf","line":226,"updated":"2020-07-24 17:52:42.000000000","message":"Added this log","commit_id":"86ca2bd6442e7b0a21193f2d39e7f5516aa50ef9"}],"glance/async_/__init__.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"9c4c89a07c9395dafaae250878df50e8ea277b84","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    This must be called after set_threadpool_model() whenever"},{"line_number":168,"context_line":"    some code needs to know what the threadpool implementation is."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    :raises: AssertionError if the model has not yet been set."},{"line_number":171,"context_line":"    \"\"\""},{"line_number":172,"context_line":"    global _THREADPOOL_MODEL"},{"line_number":173,"context_line":"    assert _THREADPOOL_MODEL"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_8e888f71","line":170,"updated":"2020-07-24 15:33:24.000000000","message":"I\u0027m not exactly sure what the current preference for this is but thus far we have avoided asserts in logic for those who run the service under PyPy with -OO. Do we actually break something if this assert on line 173 is just skipped?","commit_id":"6a063a17a08e5a819483479fffd50e8cff6f6b2d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"af55f7497256aaf49d539224bda6a82820fbfb4e","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    This must be called after set_threadpool_model() whenever"},{"line_number":168,"context_line":"    some code needs to know what the threadpool implementation is."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    :raises: AssertionError if the model has not yet been set."},{"line_number":171,"context_line":"    \"\"\""},{"line_number":172,"context_line":"    global _THREADPOOL_MODEL"},{"line_number":173,"context_line":"    assert _THREADPOOL_MODEL"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f560f44_5a88711e","line":170,"in_reply_to":"bf51134e_8e888f71","updated":"2020-07-24 16:44:46.000000000","message":"No, it\u0027s mostly just to help developers realize they\u0027ve done something wrong and to avoid something (like tests) trying to switch the model at runtime without being explicit about it.\n\nThis should never happen in production, so running with assertions disabled is fine. If you want to raise something different here we can, but optimizing out the assertion for non-debugging cases is actually what you want.","commit_id":"6a063a17a08e5a819483479fffd50e8cff6f6b2d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbdbc895e0db31ede3257849d6f034e2a7783197","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        threadpool_cls \u003d self.get_threadpool_executor_class()"},{"line_number":100,"context_line":"        LOG.debug(\u0027Creating threadpool model %r with size %i\u0027,"},{"line_number":101,"context_line":"                  threadpool_cls.__name__, size)"},{"line_number":102,"context_line":"        self.pool \u003d threadpool_cls(size)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def spawn(self, fn, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_7de60feb","line":101,"updated":"2020-07-24 17:52:42.000000000","message":"Added this log","commit_id":"86ca2bd6442e7b0a21193f2d39e7f5516aa50ef9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbdbc895e0db31ede3257849d6f034e2a7783197","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # ...changing it is not."},{"line_number":161,"context_line":"        raise RuntimeError(\u0027Thread model is already set\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    LOG.info(\u0027Threadpool model set to %r\u0027, model.__name__)"},{"line_number":164,"context_line":"    _THREADPOOL_MODEL \u003d model"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_3ddc9717","line":163,"updated":"2020-07-24 17:52:42.000000000","message":"Added this log","commit_id":"86ca2bd6442e7b0a21193f2d39e7f5516aa50ef9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbdbc895e0db31ede3257849d6f034e2a7783197","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    This must be called after set_threadpool_model() whenever"},{"line_number":171,"context_line":"    some code needs to know what the threadpool implementation is."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    This may only be called after set_threadpool_model() has been"},{"line_number":174,"context_line":"    called to set the desired threading mode. If it is called before"},{"line_number":175,"context_line":"    the model is set, it will raise AssertionError. This would likely"},{"line_number":176,"context_line":"    be the case if this got run in a test before the model was"},{"line_number":177,"context_line":"    initialized, or if glance modules that use threading were imported"},{"line_number":178,"context_line":"    and run from some other code without setting the model first."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    :raises: AssertionError if the model has not yet been set."},{"line_number":181,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_ddc11b31","line":178,"range":{"start_line":173,"start_character":4,"end_line":178,"end_character":65},"updated":"2020-07-24 17:52:42.000000000","message":"Added this clarification per Erno.","commit_id":"86ca2bd6442e7b0a21193f2d39e7f5516aa50ef9"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fbdbc895e0db31ede3257849d6f034e2a7783197","unresolved":false,"context_lines":[{"line_number":735,"context_line":"            # https://bugs.launchpad.net/glance/+bug/1712463 taskflow is not"},{"line_number":736,"context_line":"            # executing. Once it is fixed instead of mocking spawn method"},{"line_number":737,"context_line":"            # we should mock execute method of _ImportToStore task."},{"line_number":738,"context_line":"            mock_gpt.return_value.spawn.side_effect \u003d ValueError"},{"line_number":739,"context_line":"            self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":740,"context_line":"                              self.controller.import_image, request, UUID4,"},{"line_number":741,"context_line":"                              {\u0027method\u0027: {\u0027name\u0027: \u0027glance-direct\u0027}})"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f560f44_5d04eb7b","line":738,"range":{"start_line":738,"start_character":12,"end_line":738,"end_character":64},"updated":"2020-07-24 17:52:42.000000000","message":"Changed this mock because we were sometimes failing if this ran late and we had moved around the system thread model in those other tests. This makes it immune to that global state and validates the thing we want, regardless of the model.","commit_id":"86ca2bd6442e7b0a21193f2d39e7f5516aa50ef9"}]}
