)]}'
{"openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers-model.service.js":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"0a37c4b514d315244bf4f83e906c0c4bb85a0876","unresolved":false,"context_lines":[{"line_number":243,"context_line":"     *"},{"line_number":244,"context_line":"     *     {"},{"line_number":245,"context_line":"     *       folder: path of folder,"},{"line_number":246,"context_line":"     *       tree: [array recursion]"},{"line_number":247,"context_line":"     *     }"},{"line_number":248,"context_line":"     *"},{"line_number":249,"context_line":"     * The state object holds a count that should be updated for"}],"source_content_type":"text/javascript","patch_set":7,"id":"dab17558_1af2269a","line":246,"updated":"2016-05-11 16:29:35.000000000","message":"I hadn\u0027t got this explanation until looked into spec file. Perhaps an example of real result (like in spec?) would be clearer.","commit_id":"1ae647797e6bb0ee640c885f5cba2a7ed0d82293"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"0a37c4b514d315244bf4f83e906c0c4bb85a0876","unresolved":false,"context_lines":[{"line_number":258,"context_line":"      return $q.all(items.map(function each(item) {"},{"line_number":259,"context_line":"        if (item.is_object) {"},{"line_number":260,"context_line":"          state.counted.files++;"},{"line_number":261,"context_line":"          result.push(item.path);"},{"line_number":262,"context_line":"        } else {"},{"line_number":263,"context_line":"          var folder \u003d {folder: item.path, tree: []};"},{"line_number":264,"context_line":"          if (state.cancel) {"}],"source_content_type":"text/javascript","patch_set":7,"id":"dab17558_5feca029","line":261,"updated":"2016-05-11 16:29:35.000000000","message":"Is it okay to return undefined as a promise in that branch?","commit_id":"1ae647797e6bb0ee640c885f5cba2a7ed0d82293"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"f642425ced0b569c0c339c8ffb7f6c07219b4b43","unresolved":false,"context_lines":[{"line_number":258,"context_line":"      return $q.all(items.map(function each(item) {"},{"line_number":259,"context_line":"        if (item.is_object) {"},{"line_number":260,"context_line":"          state.counted.files++;"},{"line_number":261,"context_line":"          result.push(item.path);"},{"line_number":262,"context_line":"        } else {"},{"line_number":263,"context_line":"          var folder \u003d {folder: item.path, tree: []};"},{"line_number":264,"context_line":"          if (state.cancel) {"}],"source_content_type":"text/javascript","patch_set":7,"id":"dab17558_b81dcb74","line":261,"in_reply_to":"dab17558_5feca029","updated":"2016-05-12 01:39:14.000000000","message":"An explicit null would be better, yes.","commit_id":"1ae647797e6bb0ee640c885f5cba2a7ed0d82293"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"0a37c4b514d315244bf4f83e906c0c4bb85a0876","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        return null;"},{"line_number":323,"context_line":"      }"},{"line_number":324,"context_line":"      if (!node.tree.length) {"},{"line_number":325,"context_line":"        return null;"},{"line_number":326,"context_line":"      }"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"      // find the first non-null in the tree array"}],"source_content_type":"text/javascript","patch_set":7,"id":"dab17558_fe947137","line":325,"updated":"2016-05-11 16:29:35.000000000","message":"What if we actually deleted folder (`node.folder`) here (`apiService.delete` call)? That would mean returning a single promise here. Then, going to line 370...","commit_id":"1ae647797e6bb0ee640c885f5cba2a7ed0d82293"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"0a37c4b514d315244bf4f83e906c0c4bb85a0876","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        // first recurse so we do the leaves first"},{"line_number":368,"context_line":"        return recursiveDeleteFolders(state, subnode);"},{"line_number":369,"context_line":"      })).then(function then() {"},{"line_number":370,"context_line":"        // delete that first folder at this level"},{"line_number":371,"context_line":"        var folder \u003d nextFolder();"},{"line_number":372,"context_line":"        if (folder !\u003d\u003d null) {"},{"line_number":373,"context_line":"          var path \u003d folder.folder + model.DELIMETER;"}],"source_content_type":"text/javascript","patch_set":7,"id":"dab17558_9e4285ac","line":370,"updated":"2016-05-11 16:29:35.000000000","message":"... instead of hiding actual deletion into done callback, we could use the $q.all(...).then() resolve as a signal that all empty folders below has been deleted and then delete current-level folder, namely `node.folder`, return apiService.delete() promise here. Although that may not run well with failures, hm... Nevertheless, what do you think of this simplification?","commit_id":"1ae647797e6bb0ee640c885f5cba2a7ed0d82293"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"88ea8b770c7270e84b2ba40c8edacd0999fd3403","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        // first recurse so we do the leaves first"},{"line_number":368,"context_line":"        return recursiveDeleteFolders(state, subnode);"},{"line_number":369,"context_line":"      })).then(function then() {"},{"line_number":370,"context_line":"        deleteFolder(node.folder);"},{"line_number":371,"context_line":"      });"},{"line_number":372,"context_line":"    }"},{"line_number":373,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":10,"id":"dab17558_73737316","line":370,"updated":"2016-05-12 10:18:06.000000000","message":"There\u0027s a missing return here, without it the call which deletes B\u0027s parent, A, won\u0027t wait for B deletion (which happens timely only when B\u0027s leaves c and d are deleted - thanks to the fact that line 336 has a \u0027return\u0027 statement). But if we add return here, then the resulting promise returned at line 366 will resolve only when value returned from .then() at 369 is resolved.","commit_id":"f8a7f05247e3ea0f2570c6ffa1d0746b4bce8d69"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"87f00a44ab0faaef59c0864087bbe5ea6dfd9968","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        // first recurse so we do the leaves first"},{"line_number":368,"context_line":"        return recursiveDeleteFolders(state, subnode);"},{"line_number":369,"context_line":"      })).then(function then() {"},{"line_number":370,"context_line":"        deleteFolder(node.folder);"},{"line_number":371,"context_line":"      });"},{"line_number":372,"context_line":"    }"},{"line_number":373,"context_line":"  }"}],"source_content_type":"text/javascript","patch_set":10,"id":"dab17558_ea96c64a","line":370,"in_reply_to":"dab17558_73737316","updated":"2016-05-16 06:06:53.000000000","message":"Well spotted! This also solves Matt\u0027s bug report!","commit_id":"f8a7f05247e3ea0f2570c6ffa1d0746b4bce8d69"},{"author":{"_account_id":12826,"name":"Rob Cresswell","display_name":"robcresswell","email":"robert.cresswell@outlook.com","username":"rob-cresswell"},"change_message_id":"331eed988a399cea77ea0455ad5ff1c5750203af","unresolved":false,"context_lines":[{"line_number":65,"context_line":"      recursiveDelete: recursiveDelete,"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"      _recursiveDeleteFiles: recursiveDeleteFiles,"},{"line_number":68,"context_line":"      _recursiveDeleteFolders: recursiveDeleteFolders"},{"line_number":69,"context_line":"    };"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    // keep a handle on this promise so that controllers can resolve on the"}],"source_content_type":"text/javascript","patch_set":12,"id":"dab17558_c36be4b7","line":68,"updated":"2016-05-16 10:37:28.000000000","message":"The Python developer is creeping to the surface I see","commit_id":"f5172598c0618bb9ed2771c8d77afb8e9e824941"}]}
