{"action":"opened","number":5545,"pull_request":{"url":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545","id":184749109,"html_url":"https://github.com/sakaiproject/sakai/pull/5545","diff_url":"https://github.com/sakaiproject/sakai/pull/5545.diff","patch_url":"https://github.com/sakaiproject/sakai/pull/5545.patch","issue_url":"https://api.github.com/repos/sakaiproject/sakai/issues/5545","number":5545,"state":"open","locked":false,"title":"SAK-39934 - Improvements wrt unpublishing sites with the Course Site Removal job","user":{"login":"bbailla2","id":10620229,"avatar_url":"https://avatars1.githubusercontent.com/u/10620229?v=4","gravatar_id":"","url":"https://api.github.com/users/bbailla2","html_url":"https://github.com/bbailla2","followers_url":"https://api.github.com/users/bbailla2/followers","following_url":"https://api.github.com/users/bbailla2/following{/other_user}","gists_url":"https://api.github.com/users/bbailla2/gists{/gist_id}","starred_url":"https://api.github.com/users/bbailla2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbailla2/subscriptions","organizations_url":"https://api.github.com/users/bbailla2/orgs","repos_url":"https://api.github.com/users/bbailla2/repos","events_url":"https://api.github.com/users/bbailla2/events{/privacy}","received_events_url":"https://api.github.com/users/bbailla2/received_events","type":"User","site_admin":false},"body":"The Course Site Removal job's default configuration is to unpublish sites.\r\nIn our seven years of working on Sakai at Western, it's safe to say that this piece has the... 'least optimal' performance. Once, we ran this in our QA environment and got sidetracked; it completed after 12 days of execution.\r\n\r\nA big part of this is that it invokes siteService.save(site) has a lot of slow performing hooks (as once might expect, you're saving a whole site afterall!). These hooks include:\r\n- triggering SiteAdvisors\r\n- deleting all pages, tools, properties, etc., associated with the site, then inserting them all back with any modifications\r\n- handling authz group changes\r\n- notifying ContextObservers to do their own work related to the site modification\r\n- triggering EventTrackingService\r\nThese are important hooks, but generally, all except the EventTrackingService are not necessary when the job's intention is to simply flip the \"published\" flag to 0.\r\n\r\nSo I introduced a sakai.property which allows all those hooked to be bypassed; default is false:\r\ncourse_site_removal_service.silently.unpublish=false (default)\r\n\r\nWe also have a use case to handle sites that are crosslisted with sections in different terms.\r\nFor instance, consider a course that has two sections attached - CompSci101FW18A, and CompSci101FW18B. Those two sections can be in different terms.\r\nIf CompSci101FW18A is associated with an Academic Session whose end date is December, and CompSci101B is associated with an Academic Session whose end date is in May, the job currently only considers one of these end dates (the first one that was attached if I'm not mistaken). But we don't want to unpublish this site until both sections' academic sessions' end dates fall before the grace period, so the job needs to consider all the attached sections' Academic Session end dates before it can decide whether it can unpublish the site.\r\nI've introduced a sakai.property for this too that is also off by default:\r\ncourse_site_removal_service.handle.crosslisting=false","created_at":"2018-04-27T23:38:44Z","updated_at":"2018-04-27T23:38:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545/commits","review_comments_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545/comments","review_comment_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/issues/5545/comments","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/551312853398e2015ae0268f50ee4b6c01a592de","head":{"label":"bbailla2:SAK-39934","ref":"SAK-39934","sha":"551312853398e2015ae0268f50ee4b6c01a592de","user":{"login":"bbailla2","id":10620229,"avatar_url":"https://avatars1.githubusercontent.com/u/10620229?v=4","gravatar_id":"","url":"https://api.github.com/users/bbailla2","html_url":"https://github.com/bbailla2","followers_url":"https://api.github.com/users/bbailla2/followers","following_url":"https://api.github.com/users/bbailla2/following{/other_user}","gists_url":"https://api.github.com/users/bbailla2/gists{/gist_id}","starred_url":"https://api.github.com/users/bbailla2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbailla2/subscriptions","organizations_url":"https://api.github.com/users/bbailla2/orgs","repos_url":"https://api.github.com/users/bbailla2/repos","events_url":"https://api.github.com/users/bbailla2/events{/privacy}","received_events_url":"https://api.github.com/users/bbailla2/received_events","type":"User","site_admin":false},"repo":{"id":29549815,"name":"sakai","full_name":"bbailla2/sakai","owner":{"login":"bbailla2","id":10620229,"avatar_url":"https://avatars1.githubusercontent.com/u/10620229?v=4","gravatar_id":"","url":"https://api.github.com/users/bbailla2","html_url":"https://github.com/bbailla2","followers_url":"https://api.github.com/users/bbailla2/followers","following_url":"https://api.github.com/users/bbailla2/following{/other_user}","gists_url":"https://api.github.com/users/bbailla2/gists{/gist_id}","starred_url":"https://api.github.com/users/bbailla2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbailla2/subscriptions","organizations_url":"https://api.github.com/users/bbailla2/orgs","repos_url":"https://api.github.com/users/bbailla2/repos","events_url":"https://api.github.com/users/bbailla2/events{/privacy}","received_events_url":"https://api.github.com/users/bbailla2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbailla2/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":true,"url":"https://api.github.com/repos/bbailla2/sakai","forks_url":"https://api.github.com/repos/bbailla2/sakai/forks","keys_url":"https://api.github.com/repos/bbailla2/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbailla2/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbailla2/sakai/teams","hooks_url":"https://api.github.com/repos/bbailla2/sakai/hooks","issue_events_url":"https://api.github.com/repos/bbailla2/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/bbailla2/sakai/events","assignees_url":"https://api.github.com/repos/bbailla2/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/bbailla2/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/bbailla2/sakai/tags","blobs_url":"https://api.github.com/repos/bbailla2/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbailla2/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbailla2/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbailla2/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbailla2/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/bbailla2/sakai/languages","stargazers_url":"https://api.github.com/repos/bbailla2/sakai/stargazers","contributors_url":"https://api.github.com/repos/bbailla2/sakai/contributors","subscribers_url":"https://api.github.com/repos/bbailla2/sakai/subscribers","subscription_url":"https://api.github.com/repos/bbailla2/sakai/subscription","commits_url":"https://api.github.com/repos/bbailla2/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbailla2/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbailla2/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbailla2/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbailla2/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/bbailla2/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbailla2/sakai/merges","archive_url":"https://api.github.com/repos/bbailla2/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbailla2/sakai/downloads","issues_url":"https://api.github.com/repos/bbailla2/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/bbailla2/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/bbailla2/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/bbailla2/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbailla2/sakai/labels{/name}","releases_url":"https://api.github.com/repos/bbailla2/sakai/releases{/id}","deployments_url":"https://api.github.com/repos/bbailla2/sakai/deployments","created_at":"2015-01-20T20:13:54Z","updated_at":"2018-04-27T23:36:00Z","pushed_at":"2018-04-27T23:37:11Z","git_url":"git://github.com/bbailla2/sakai.git","ssh_url":"git@github.com:bbailla2/sakai.git","clone_url":"https://github.com/bbailla2/sakai.git","svn_url":"https://github.com/bbailla2/sakai","homepage":"https://www.sakaiproject.org","size":349262,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"ecl-2.0","name":"Educational Community License v2.0","spdx_id":"ECL-2.0","url":"https://api.github.com/licenses/ecl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sakaiproject:master","ref":"master","sha":"1253dcee781c8adfaff0a4ba827985180d649d1f","user":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars0.githubusercontent.com/u/314726?v=4","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"repo":{"id":28589709,"name":"sakai","full_name":"sakaiproject/sakai","owner":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars0.githubusercontent.com/u/314726?v=4","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sakaiproject/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":false,"url":"https://api.github.com/repos/sakaiproject/sakai","forks_url":"https://api.github.com/repos/sakaiproject/sakai/forks","keys_url":"https://api.github.com/repos/sakaiproject/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sakaiproject/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sakaiproject/sakai/teams","hooks_url":"https://api.github.com/repos/sakaiproject/sakai/hooks","issue_events_url":"https://api.github.com/repos/sakaiproject/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/sakaiproject/sakai/events","assignees_url":"https://api.github.com/repos/sakaiproject/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/sakaiproject/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/sakaiproject/sakai/tags","blobs_url":"https://api.github.com/repos/sakaiproject/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sakaiproject/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sakaiproject/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/sakaiproject/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/sakaiproject/sakai/languages","stargazers_url":"https://api.github.com/repos/sakaiproject/sakai/stargazers","contributors_url":"https://api.github.com/repos/sakaiproject/sakai/contributors","subscribers_url":"https://api.github.com/repos/sakaiproject/sakai/subscribers","subscription_url":"https://api.github.com/repos/sakaiproject/sakai/subscription","commits_url":"https://api.github.com/repos/sakaiproject/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/sakaiproject/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/sakaiproject/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/sakaiproject/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/sakaiproject/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sakaiproject/sakai/merges","archive_url":"https://api.github.com/repos/sakaiproject/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sakaiproject/sakai/downloads","issues_url":"https://api.github.com/repos/sakaiproject/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/sakaiproject/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/sakaiproject/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/sakaiproject/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sakaiproject/sakai/labels{/name}","releases_url":"https://api.github.com/repos/sakaiproject/sakai/releases{/id}","deployments_url":"https://api.github.com/repos/sakaiproject/sakai/deployments","created_at":"2014-12-29T11:14:17Z","updated_at":"2018-04-27T19:27:50Z","pushed_at":"2018-04-27T19:27:46Z","git_url":"git://github.com/sakaiproject/sakai.git","ssh_url":"git@github.com:sakaiproject/sakai.git","clone_url":"https://github.com/sakaiproject/sakai.git","svn_url":"https://github.com/sakaiproject/sakai","homepage":"https://www.sakaiproject.org","size":359298,"stargazers_count":363,"watchers_count":363,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":512,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"ecl-2.0","name":"Educational Community License v2.0","spdx_id":"ECL-2.0","url":"https://api.github.com/licenses/ecl-2.0"},"forks":512,"open_issues":58,"watchers":363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545"},"html":{"href":"https://github.com/sakaiproject/sakai/pull/5545"},"issue":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/5545"},"comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/5545/comments"},"review_comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545/comments"},"review_comment":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/5545/commits"},"statuses":{"href":"https://api.github.com/repos/sakaiproject/sakai/statuses/551312853398e2015ae0268f50ee4b6c01a592de"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":767,"deletions":71,"changed_files":11}}
{"actor":{"display_login":"bbailla2"}}