)]}'
{"doc/source/user/index.rst":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d95689111dfc3c644c3f1e37d54b8696f34f59fb","unresolved":true,"context_lines":[{"line_number":124,"context_line":"   from the original size."},{"line_number":125,"context_line":"   "},{"line_number":126,"context_line":"   If increased, the size of the share will be extended."},{"line_number":127,"context_line":"   If decreased, the size of the share will be shrinked."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"#. Click :guilabel:`Resize Share`."},{"line_number":130,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7d35d779_082fb255","line":127,"updated":"2021-01-28 12:35:04.000000000","message":"Maybe we can add a note here, specifying that the size of the share cannot be lower than the size of the data stored in the share.","commit_id":"338f505e2f5977ce99b42e260146b9a5de0a3ca3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"d439ba05448ae6df425b45c6eb372df458265031","unresolved":true,"context_lines":[{"line_number":124,"context_line":"   from the original size."},{"line_number":125,"context_line":"   "},{"line_number":126,"context_line":"   If increased, the size of the share will be extended."},{"line_number":127,"context_line":"   If decreased, the size of the share will be shrinked."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"#. Click :guilabel:`Resize Share`."},{"line_number":130,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"0a794691_9b16b475","line":127,"in_reply_to":"7d35d779_082fb255","updated":"2021-01-28 12:46:08.000000000","message":"Ok, makes sense. Will add :)","commit_id":"338f505e2f5977ce99b42e260146b9a5de0a3ca3"}],"manila_ui/api/manila.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"6668b6aeb2e8e86d257039564042a8ac22c5b98b","unresolved":true,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def share_resize(request, share_id, new_size, orig_size):"},{"line_number":193,"context_line":"    if orig_size \u003e new_size:"},{"line_number":194,"context_line":"        return manilaclient(request).shares.shrink(share_id, new_size)"},{"line_number":195,"context_line":"    else:"},{"line_number":196,"context_line":"        return manilaclient(request).shares.extend(share_id, new_size)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"d616a30b_f78aa14a","line":194,"updated":"2021-02-17 10:31:55.000000000","message":"Here we would need to check the response of the request we are performing. No exceptions will be thrown, so we can\u0027t catch it. Instead, we will get a failure response.","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"240cf55cf9623d3c0a624150b14a6df0f39311e4","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def share_resize(request, share_id, new_size, orig_size):"},{"line_number":193,"context_line":"    if orig_size \u003e new_size:"},{"line_number":194,"context_line":"        return manilaclient(request).shares.shrink(share_id, new_size)"},{"line_number":195,"context_line":"    else:"},{"line_number":196,"context_line":"        return manilaclient(request).shares.extend(share_id, new_size)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dbb0f265_0ffe7c72","line":194,"in_reply_to":"d616a30b_f78aa14a","updated":"2021-02-23 12:32:15.000000000","message":"As it fails silently, additional check was added to the forms.","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"}],"manila_ui/dashboards/project/shares/forms.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"81c16295731d3a77ea6b6fa60a51bfb278ad4733","unresolved":true,"context_lines":[{"line_number":369,"context_line":"        orig_size \u003d self.initial[\u0027orig_size\u0027]"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        if new_size \u003d\u003d orig_size:"},{"line_number":372,"context_line":"            message \u003d _(\"New size must be greater or less than current size.\")"},{"line_number":373,"context_line":"            self._errors[\"new_size\"] \u003d self.error_class([message])"},{"line_number":374,"context_line":"            return cleaned_data"},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"57315cf3_a206f15a","line":372,"updated":"2021-02-16 20:29:35.000000000","message":"NIT. \"New size must be different than current size.\" Maybe this sounds better... not sure if a native English speaker can chime in here :)","commit_id":"338f505e2f5977ce99b42e260146b9a5de0a3ca3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"9b1c7d8d79bb903c9755289634fe54bc865b1b72","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        orig_size \u003d self.initial[\u0027orig_size\u0027]"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"        if new_size \u003d\u003d orig_size:"},{"line_number":372,"context_line":"            message \u003d _(\"New size must be greater or less than current size.\")"},{"line_number":373,"context_line":"            self._errors[\"new_size\"] \u003d self.error_class([message])"},{"line_number":374,"context_line":"            return cleaned_data"},{"line_number":375,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"89e6f7a7_58977e30","line":372,"in_reply_to":"57315cf3_a206f15a","updated":"2021-02-25 08:27:27.000000000","message":"Done","commit_id":"338f505e2f5977ce99b42e260146b9a5de0a3ca3"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"6668b6aeb2e8e86d257039564042a8ac22c5b98b","unresolved":true,"context_lines":[{"line_number":387,"context_line":"    def handle(self, request, data):"},{"line_number":388,"context_line":"        share_id \u003d self.initial[\u0027share_id\u0027]"},{"line_number":389,"context_line":"        try:"},{"line_number":390,"context_line":"            manila.share_resize(request, share_id, data[\u0027new_size\u0027],"},{"line_number":391,"context_line":"                                data[\u0027orig_size\u0027])"},{"line_number":392,"context_line":"            message \u003d _(\u0027Resize share \"%s\"\u0027) % data[\u0027name\u0027]"},{"line_number":393,"context_line":"            messages.success(request, message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ea533310_33a6392c","line":390,"updated":"2021-02-17 10:31:55.000000000","message":"So... if we get a failure here, we should  raise an Exception (so the exception part is executed). We should\u0027t send the success message and return successfully.","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"240cf55cf9623d3c0a624150b14a6df0f39311e4","unresolved":false,"context_lines":[{"line_number":387,"context_line":"    def handle(self, request, data):"},{"line_number":388,"context_line":"        share_id \u003d self.initial[\u0027share_id\u0027]"},{"line_number":389,"context_line":"        try:"},{"line_number":390,"context_line":"            manila.share_resize(request, share_id, data[\u0027new_size\u0027],"},{"line_number":391,"context_line":"                                data[\u0027orig_size\u0027])"},{"line_number":392,"context_line":"            message \u003d _(\u0027Resize share \"%s\"\u0027) % data[\u0027name\u0027]"},{"line_number":393,"context_line":"            messages.success(request, message)"}],"source_content_type":"text/x-python","patch_set":6,"id":"05cfb0af_5382b416","line":390,"in_reply_to":"ea533310_33a6392c","updated":"2021-02-23 12:32:15.000000000","message":"Done","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"1c705ab3eaf68fdf22755c5bfe9e6505244b7c60","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        orig_size \u003d data[\u0027orig_size\u0027]"},{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            manila.share_resize(request, share_id, new_size, orig_size)"},{"line_number":399,"context_line":"            time.sleep(3)"},{"line_number":400,"context_line":"            share_size \u003d manila.share_get("},{"line_number":401,"context_line":"                request, share_id).size"},{"line_number":402,"context_line":"            if share_size !\u003d new_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"a6f6d868_f09427dc","line":399,"updated":"2021-02-23 12:37:10.000000000","message":"I added time delay, because if I call share_get immediately, the size of the share will be unchanged. Please let me know if there are other ways to do it.","commit_id":"1cf1b4e15ae3c15780f9464674d2e9aa0403c384"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"0a7d7564b39709b5e0cd1b6e54e991ebb53f3854","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        orig_size \u003d data[\u0027orig_size\u0027]"},{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            manila.share_resize(request, share_id, new_size, orig_size)"},{"line_number":399,"context_line":"            time.sleep(3)"},{"line_number":400,"context_line":"            share_size \u003d manila.share_get("},{"line_number":401,"context_line":"                request, share_id).size"},{"line_number":402,"context_line":"            if share_size !\u003d new_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"e5adcc37_5e697e43","line":399,"in_reply_to":"81ca7952_4ec4747d","updated":"2021-02-24 16:12:53.000000000","message":"Hi Goutham, thanks for suggestions. I slightly modified the code to use share status and raise an error banner, in case share wasn\u0027t resized.","commit_id":"1cf1b4e15ae3c15780f9464674d2e9aa0403c384"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"11ae8ce01942e76fdb115d4bc9592c67b0c59b24","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        orig_size \u003d data[\u0027orig_size\u0027]"},{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            manila.share_resize(request, share_id, new_size, orig_size)"},{"line_number":399,"context_line":"            time.sleep(3)"},{"line_number":400,"context_line":"            share_size \u003d manila.share_get("},{"line_number":401,"context_line":"                request, share_id).size"},{"line_number":402,"context_line":"            if share_size !\u003d new_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"81ca7952_4ec4747d","line":399,"in_reply_to":"a6f6d868_f09427dc","updated":"2021-02-24 00:16:57.000000000","message":"Hi Dina, \n\nthanks for exploring this. I wonder if we should just send the resize request, and raise a banner saying that if the share cannot be resized, it will not be modified. That way, users know what to expect in case they don\u0027t understand this behavior. What do you think? \nWaiting on this modal form with a sleep sounds a bit strange to me. \n\nJust spitballing another alternative: if it\u0027s possible to track a \"shrinking\" share (along with its size) on the shares table view and when the share state changes, we can see if the status is set to \"available\", and compare sizes and raise an error banner stating that share couldn\u0027t be shrunk to prevent data loss.","commit_id":"1cf1b4e15ae3c15780f9464674d2e9aa0403c384"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"6ac0c27493f06f5662286eb11cfa002ad51e4cb8","unresolved":true,"context_lines":[{"line_number":401,"context_line":"                time.sleep(1)"},{"line_number":402,"context_line":"                share_status \u003d manila.share_get(request, share_id).status"},{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Share Driver refused to shrink the \"%s\".\u0027"},{"line_number":407,"context_line":"                    \u0027 The size to be shrunk is smaller than the \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"b30c1603_85faf7af","line":404,"updated":"2021-02-24 19:58:05.000000000","message":"new_size \u003c orig_size and share_size !\u003d new_size","commit_id":"f392af93c75b9a4f71f39affb80702df818dcb3e"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"1937e89fac47274aa61339918bc1122a1e505eca","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                time.sleep(1)"},{"line_number":402,"context_line":"                share_status \u003d manila.share_get(request, share_id).status"},{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Share Driver refused to shrink the \"%s\".\u0027"},{"line_number":407,"context_line":"                    \u0027 The size to be shrunk is smaller than the \u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"20448b26_88f06978","line":404,"in_reply_to":"b30c1603_85faf7af","updated":"2021-02-25 08:02:19.000000000","message":"Done","commit_id":"f392af93c75b9a4f71f39affb80702df818dcb3e"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"6ac0c27493f06f5662286eb11cfa002ad51e4cb8","unresolved":true,"context_lines":[{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Share Driver refused to shrink the \"%s\".\u0027"},{"line_number":407,"context_line":"                    \u0027 The size to be shrunk is smaller than the \u0027"},{"line_number":408,"context_line":"                    \u0027current used space.\u0027"},{"line_number":409,"context_line":"                    \u0027Please select a size greater than the current used space.\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"a28a92b9_6d7b9f9a","line":406,"updated":"2021-02-24 19:58:05.000000000","message":"Maybe rephrase to: \"Shrink operation for share \"%s\" didn\u0027t complete to prevent data loss. Manually remove data from your share and try to shrink again.\"","commit_id":"f392af93c75b9a4f71f39affb80702df818dcb3e"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"1937e89fac47274aa61339918bc1122a1e505eca","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Share Driver refused to shrink the \"%s\".\u0027"},{"line_number":407,"context_line":"                    \u0027 The size to be shrunk is smaller than the \u0027"},{"line_number":408,"context_line":"                    \u0027current used space.\u0027"},{"line_number":409,"context_line":"                    \u0027Please select a size greater than the current used space.\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"6b7ad7ee_65a2ab18","line":406,"in_reply_to":"a28a92b9_6d7b9f9a","updated":"2021-02-25 08:02:19.000000000","message":"Done","commit_id":"f392af93c75b9a4f71f39affb80702df818dcb3e"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"5d0f755e5b4e5237428f37a0a01f11f7508aaa81","unresolved":true,"context_lines":[{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            manila.share_resize(request, share_id, new_size, orig_size)"},{"line_number":399,"context_line":"            share_status \u003d manila.share_get(request, share_id).status"},{"line_number":400,"context_line":"            while share_status !\u003d \u0027available\u0027:"},{"line_number":401,"context_line":"                time.sleep(1)"},{"line_number":402,"context_line":"                share_status \u003d manila.share_get(request, share_id).status"},{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if new_size \u003c orig_size and share_size !\u003d new_size:"}],"source_content_type":"text/x-python","patch_set":10,"id":"189ccc75_57575ff9","line":401,"range":{"start_line":400,"start_character":12,"end_line":401,"end_character":29},"updated":"2021-02-26 08:40:16.000000000","message":"Thinking out loud: I haven\u0027t seen this pattern elsewhere; am wondering if this safe to block like this.","commit_id":"e579fcb21077cc77cdb180a23be5469d046d5520"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"71f009e848ea60d2d6abdfdff52a6b15bc19da47","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            manila.share_resize(request, share_id, new_size, orig_size)"},{"line_number":399,"context_line":"            share_status \u003d manila.share_get(request, share_id).status"},{"line_number":400,"context_line":"            while share_status !\u003d \u0027available\u0027:"},{"line_number":401,"context_line":"                time.sleep(1)"},{"line_number":402,"context_line":"                share_status \u003d manila.share_get(request, share_id).status"},{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if new_size \u003c orig_size and share_size !\u003d new_size:"}],"source_content_type":"text/x-python","patch_set":10,"id":"c294ed76_248b7dc0","line":401,"range":{"start_line":400,"start_character":12,"end_line":401,"end_character":29},"in_reply_to":"189ccc75_57575ff9","updated":"2021-03-01 07:09:13.000000000","message":"😊 yes, this is not the best implementation. Though short of ideas how to implement waiter in another way.","commit_id":"e579fcb21077cc77cdb180a23be5469d046d5520"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"5d0f755e5b4e5237428f37a0a01f11f7508aaa81","unresolved":true,"context_lines":[{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if new_size \u003c orig_size and share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Shrink operation for share \"%s\" didn\\\u0027t complete \u0027"},{"line_number":407,"context_line":"                    \u0027to prevent data loss. Manually remove data from \u0027"},{"line_number":408,"context_line":"                    \u0027your share and try to shrink again.\u0027 % data[\u0027name\u0027])"},{"line_number":409,"context_line":"                messages.error(request, message)"},{"line_number":410,"context_line":"                raise Exception"},{"line_number":411,"context_line":"            else:"},{"line_number":412,"context_line":"                message \u003d _(\u0027Resized share \"%s\"\u0027) % data[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"885a4259_f867fca3","line":409,"range":{"start_line":406,"start_character":20,"end_line":409,"end_character":0},"updated":"2021-02-26 08:40:16.000000000","message":"Another possibility where the size doesn\u0027t change, and the share is reverted to \"available\" is when a backend driver doesn\u0027t support shrinking the share.\n\nSo this message should perhaps be inclusive of that scenario as well. Another thought is to redirect to the user messages tab from line 416... WDYT?","commit_id":"e579fcb21077cc77cdb180a23be5469d046d5520"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"71f009e848ea60d2d6abdfdff52a6b15bc19da47","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if new_size \u003c orig_size and share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Shrink operation for share \"%s\" didn\\\u0027t complete \u0027"},{"line_number":407,"context_line":"                    \u0027to prevent data loss. Manually remove data from \u0027"},{"line_number":408,"context_line":"                    \u0027your share and try to shrink again.\u0027 % data[\u0027name\u0027])"},{"line_number":409,"context_line":"                messages.error(request, message)"},{"line_number":410,"context_line":"                raise Exception"},{"line_number":411,"context_line":"            else:"},{"line_number":412,"context_line":"                message \u003d _(\u0027Resized share \"%s\"\u0027) % data[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"88b45152_6d622bce","line":409,"range":{"start_line":406,"start_character":20,"end_line":409,"end_character":0},"in_reply_to":"885a4259_f867fca3","updated":"2021-03-01 07:09:13.000000000","message":"Ack, will change it to redirect to line 416. Like below:\nif share_size !\u003d new_size:\n    raise Exception\nTo raise exception in any case of silent fails, both when extending and shrinking.","commit_id":"e579fcb21077cc77cdb180a23be5469d046d5520"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"5048cc13c9a287b30985f4b4e7e9c65aebc3306d","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            share_size \u003d manila.share_get(request, share_id).size"},{"line_number":404,"context_line":"            if new_size \u003c orig_size and share_size !\u003d new_size:"},{"line_number":405,"context_line":"                message \u003d _("},{"line_number":406,"context_line":"                    \u0027 Shrink operation for share \"%s\" didn\\\u0027t complete \u0027"},{"line_number":407,"context_line":"                    \u0027to prevent data loss. Manually remove data from \u0027"},{"line_number":408,"context_line":"                    \u0027your share and try to shrink again.\u0027 % data[\u0027name\u0027])"},{"line_number":409,"context_line":"                messages.error(request, message)"},{"line_number":410,"context_line":"                raise Exception"},{"line_number":411,"context_line":"            else:"},{"line_number":412,"context_line":"                message \u003d _(\u0027Resized share \"%s\"\u0027) % data[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8b316a_4690aa20","line":409,"range":{"start_line":406,"start_character":20,"end_line":409,"end_character":0},"in_reply_to":"88b45152_6d622bce","updated":"2021-03-02 14:07:57.000000000","message":"time.sleep() is used quite a lot in openstack/manila. I thin it is safe to use. It is there only to reduce number of requests. I can set it to 1.5 second, I think this is approximate time when share becomes available. So number of requests reduced even more. I think now it sends about 3 requests.","commit_id":"e579fcb21077cc77cdb180a23be5469d046d5520"},{"author":{"_account_id":30407,"name":"haixin","email":"haixin_haixin@qq.com","username":"haixin"},"change_message_id":"b304b352e2fb7205ef4cb173ab813676b7c2e84d","unresolved":true,"context_lines":[{"line_number":412,"context_line":"            time_elapsed +\u003d interval"},{"line_number":413,"context_line":"            share \u003d manila.share_get(request, share_id)"},{"line_number":414,"context_line":"            if time_elapsed \u003e timeout:"},{"line_number":415,"context_line":"                break"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        if share.size \u003d\u003d new_size:"},{"line_number":418,"context_line":"            message \u003d _(\u0027Resized share \"%s\"\u0027) % share.name"}],"source_content_type":"text/x-python","patch_set":14,"id":"dc93600e_13c522dd","line":415,"range":{"start_line":415,"start_character":16,"end_line":415,"end_character":21},"updated":"2021-03-12 03:03:52.000000000","message":"if timeout here, maybe we can decide that the resize operation has failed. we no need to check size if share.status is not available. so i think here can raise Exception dircetly.","commit_id":"f0d83a6ed2e155673bf15b8055285802d079e715"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"52a378982b89fa4c4bab381df04950368d615a91","unresolved":false,"context_lines":[{"line_number":412,"context_line":"            time_elapsed +\u003d interval"},{"line_number":413,"context_line":"            share \u003d manila.share_get(request, share_id)"},{"line_number":414,"context_line":"            if time_elapsed \u003e timeout:"},{"line_number":415,"context_line":"                break"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        if share.size \u003d\u003d new_size:"},{"line_number":418,"context_line":"            message \u003d _(\u0027Resized share \"%s\"\u0027) % share.name"}],"source_content_type":"text/x-python","patch_set":14,"id":"00e15cdf_67927971","line":415,"range":{"start_line":415,"start_character":16,"end_line":415,"end_character":21},"in_reply_to":"dc93600e_13c522dd","updated":"2021-03-12 05:08:47.000000000","message":"Hi, haixin. thanks for reviewing. That\u0027s good idea, if share stuck in \"shrinking\" or \"extending\" or other status, probably operation won\u0027t complete and I can raise exception. I\u0027ll submit it as separate change.","commit_id":"f0d83a6ed2e155673bf15b8055285802d079e715"}],"manila_ui/tests/api/test_manila.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"6668b6aeb2e8e86d257039564042a8ac22c5b98b","unresolved":true,"context_lines":[{"line_number":221,"context_line":"                self.id, new_size)"},{"line_number":222,"context_line":"        else:"},{"line_number":223,"context_line":"            self.manilaclient.shares.extend.assert_called_once_with("},{"line_number":224,"context_line":"                self.id, new_size)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    # Share snapshots tests"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"0113436b_253ed915","line":224,"updated":"2021-02-17 10:31:55.000000000","message":"And probably we want to add a test for the case in which we try to do a resize to a size lower than the amount of data we have in our share.","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"},{"author":{"_account_id":29632,"name":"Carlos Eduardo","email":"ces.eduardo98@gmail.com","username":"silvacarlos"},"change_message_id":"a16e42438dadffeee6368e71e1bcae5542901d4a","unresolved":true,"context_lines":[{"line_number":221,"context_line":"                self.id, new_size)"},{"line_number":222,"context_line":"        else:"},{"line_number":223,"context_line":"            self.manilaclient.shares.extend.assert_called_once_with("},{"line_number":224,"context_line":"                self.id, new_size)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    # Share snapshots tests"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"a44952c8_6066d79f","line":224,"in_reply_to":"0113436b_253ed915","updated":"2021-02-17 20:07:28.000000000","message":"+1\nAlso, the negative scenario that could raise an exception","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"},{"author":{"_account_id":32531,"name":"Dina Saparbaeva","email":"dinas27@outlook.com","username":"disap"},"change_message_id":"240cf55cf9623d3c0a624150b14a6df0f39311e4","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                self.id, new_size)"},{"line_number":222,"context_line":"        else:"},{"line_number":223,"context_line":"            self.manilaclient.shares.extend.assert_called_once_with("},{"line_number":224,"context_line":"                self.id, new_size)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    # Share snapshots tests"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3de65479_7e032f82","line":224,"in_reply_to":"a44952c8_6066d79f","updated":"2021-02-23 12:32:15.000000000","message":"Thank you Carlos and Victoria for reviewing. Negative scenario is added. And, need help with adding case with used space. Is there any function in api module, that returns used space? thanks.","commit_id":"f8f36a37e269af2e82e35beb1c9088a223dcfec3"}]}
