{"action":"created","issue":{"url":"https://api.github.com/repos/codalab/codalab-cli/issues/331","repository_url":"https://api.github.com/repos/codalab/codalab-cli","labels_url":"https://api.github.com/repos/codalab/codalab-cli/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/issues/331/comments","events_url":"https://api.github.com/repos/codalab/codalab-cli/issues/331/events","html_url":"https://github.com/codalab/codalab-cli/pull/331","id":131949290,"number":331,"title":"#299 Store bundles by UUID instead of Digest","user":{"login":"andreweduffy","id":332583,"avatar_url":"https://avatars.githubusercontent.com/u/332583?v=3","gravatar_id":"","url":"https://api.github.com/users/andreweduffy","html_url":"https://github.com/andreweduffy","followers_url":"https://api.github.com/users/andreweduffy/followers","following_url":"https://api.github.com/users/andreweduffy/following{/other_user}","gists_url":"https://api.github.com/users/andreweduffy/gists{/gist_id}","starred_url":"https://api.github.com/users/andreweduffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreweduffy/subscriptions","organizations_url":"https://api.github.com/users/andreweduffy/orgs","repos_url":"https://api.github.com/users/andreweduffy/repos","events_url":"https://api.github.com/users/andreweduffy/events{/privacy}","received_events_url":"https://api.github.com/users/andreweduffy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-07T08:37:52Z","updated_at":"2016-02-16T00:01:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/331","html_url":"https://github.com/codalab/codalab-cli/pull/331","diff_url":"https://github.com/codalab/codalab-cli/pull/331.diff","patch_url":"https://github.com/codalab/codalab-cli/pull/331.patch"},"body":"@percyliang \r\n\r\nI've tested functionality both locally and using `cl server`, and have tested the migration script by creating a bunch of bundles from the same data, changed them to be stored de-duped by their `data_hash`, and then run `./scripts/migrate-hash-uuid.py`.\r\n\r\nSteps:\r\n\r\n1. Create a bunch of bundles:\r\n\r\n        cl up alembic.ini\r\n        cl up alembic.ini\r\n        cl up README.md\r\n        cl up alembic.ini\r\n2. Run `cl info` to find the `data_hash`, then do `mv ~/.codalab/data/$uuid ~/.codalab/data/$data_hash`. There should only end up being 2 entries in `~/.codalab/data`.\r\n3. Run `./scripts/migrate-hash-uuid.py`. You should see that there are 4 things in `~/.codalab/data`, and the directory `~/.codalab/migration-temp` is still intact with the old tree structure in case you want to restore (script prints a message telling you how to do so)."},"comment":{"url":"https://api.github.com/repos/codalab/codalab-cli/issues/comments/184446652","html_url":"https://github.com/codalab/codalab-cli/pull/331#issuecomment-184446652","issue_url":"https://api.github.com/repos/codalab/codalab-cli/issues/331","id":184446652,"user":{"login":"andreweduffy","id":332583,"avatar_url":"https://avatars.githubusercontent.com/u/332583?v=3","gravatar_id":"","url":"https://api.github.com/users/andreweduffy","html_url":"https://github.com/andreweduffy","followers_url":"https://api.github.com/users/andreweduffy/followers","following_url":"https://api.github.com/users/andreweduffy/following{/other_user}","gists_url":"https://api.github.com/users/andreweduffy/gists{/gist_id}","starred_url":"https://api.github.com/users/andreweduffy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreweduffy/subscriptions","organizations_url":"https://api.github.com/users/andreweduffy/orgs","repos_url":"https://api.github.com/users/andreweduffy/repos","events_url":"https://api.github.com/users/andreweduffy/events{/privacy}","received_events_url":"https://api.github.com/users/andreweduffy/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T00:01:23Z","updated_at":"2016-02-16T00:01:23Z","body":"@percyliang I agree with the first comment, however I believe we need to be making copies because we're now taking a single data_hash that potentially maps to multiple bundles and we're forking it off into multiple storage units under separate subdirectories."}}