{"action":"closed","number":7050,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/7050","id":29717517,"html_url":"https://github.com/edx/edx-platform/pull/7050","diff_url":"https://github.com/edx/edx-platform/pull/7050.diff","patch_url":"https://github.com/edx/edx-platform/pull/7050.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/7050","number":7050,"state":"closed","locked":false,"title":"Clear children cache when binding an XBlock to a user.","user":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"body":"The impetus for this PR was that recent changes for cohorted content meant that the list of children for an XBlock might change depending on which user the XBlock was bound to. The first commit adds test to make sure that XBlocks, XModules, and XModuleDescriptors all function correctly when listing their children before and after being bound to a user.\r\n\r\nThe remainder of the changes were follow-on to fix errors exposed by the first test.\r\n\r\n1. The cache of children wasn't being cleared when a user was bound to an XBlock, so the user's permissions might not be correctly taken into account.\r\n2. MongoModuleStore didn't re-use the CachingDescriptorSystem when it had to read new data from the database (to fill in a hole in the cached data in that DescriptorSystem). As a result, the cache of data used for inheritance (`cached_metadata`) wasn't being updated, and successive bindings of the same XBlock to different users would result in the slow disappearance of inherited data. This was resolved by allowing the modulestore to re-use the same CachingDescriptorSystem when loading new child blocks.","created_at":"2015-02-20T18:12:20Z","updated_at":"2015-03-10T18:01:23Z","closed_at":"2015-03-10T18:01:23Z","merged_at":null,"merge_commit_sha":"af7c5bd91b1d98b7176a0a21d3364a342a175ebd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/7050/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/7050/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/7050/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/2f5ab407bde7000a3e955932821fb822818f8c21","head":{"label":"cpennington:xblock-filtered-children-tests","ref":"xblock-filtered-children-tests","sha":"2f5ab407bde7000a3e955932821fb822818f8c21","user":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"repo":{"id":10688258,"name":"edx-platform","full_name":"cpennington/edx-platform","owner":{"login":"cpennington","id":30236,"avatar_url":"https://avatars.githubusercontent.com/u/30236?v=3","gravatar_id":"","url":"https://api.github.com/users/cpennington","html_url":"https://github.com/cpennington","followers_url":"https://api.github.com/users/cpennington/followers","following_url":"https://api.github.com/users/cpennington/following{/other_user}","gists_url":"https://api.github.com/users/cpennington/gists{/gist_id}","starred_url":"https://api.github.com/users/cpennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpennington/subscriptions","organizations_url":"https://api.github.com/users/cpennington/orgs","repos_url":"https://api.github.com/users/cpennington/repos","events_url":"https://api.github.com/users/cpennington/events{/privacy}","received_events_url":"https://api.github.com/users/cpennington/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cpennington/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/cpennington/edx-platform","forks_url":"https://api.github.com/repos/cpennington/edx-platform/forks","keys_url":"https://api.github.com/repos/cpennington/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpennington/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpennington/edx-platform/teams","hooks_url":"https://api.github.com/repos/cpennington/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/cpennington/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/cpennington/edx-platform/events","assignees_url":"https://api.github.com/repos/cpennington/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/cpennington/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/cpennington/edx-platform/tags","blobs_url":"https://api.github.com/repos/cpennington/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpennington/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpennington/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpennington/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpennington/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/cpennington/edx-platform/languages","stargazers_url":"https://api.github.com/repos/cpennington/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/cpennington/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/cpennington/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/cpennington/edx-platform/subscription","commits_url":"https://api.github.com/repos/cpennington/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpennington/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpennington/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpennington/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpennington/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/cpennington/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpennington/edx-platform/merges","archive_url":"https://api.github.com/repos/cpennington/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpennington/edx-platform/downloads","issues_url":"https://api.github.com/repos/cpennington/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/cpennington/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/cpennington/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/cpennington/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpennington/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/cpennington/edx-platform/releases{/id}","created_at":"2013-06-14T12:13:54Z","updated_at":"2014-06-24T17:55:28Z","pushed_at":"2015-03-10T17:15:43Z","git_url":"git://github.com/cpennington/edx-platform.git","ssh_url":"git@github.com:cpennington/edx-platform.git","clone_url":"https://github.com/cpennington/edx-platform.git","svn_url":"https://github.com/cpennington/edx-platform","homepage":"http://code.edx.org/","size":367192,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"a70cabc10fe36bbaed705992c7111aac07e3effa","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-03-10T16:50:46Z","pushed_at":"2015-03-10T17:57:14Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://openedx.org/","size":1837081,"stargazers_count":1780,"watchers_count":1780,"language":"Gettext Catalog","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1019,"mirror_url":null,"open_issues_count":136,"forks":1019,"open_issues":136,"watchers":1780,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7050"},"html":{"href":"https://github.com/edx/edx-platform/pull/7050"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/7050"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/7050/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7050/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7050/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/2f5ab407bde7000a3e955932821fb822818f8c21"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":6,"review_comments":5,"commits":14,"additions":399,"deletions":109,"changed_files":13}}