Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause content pipeline during Hour of Code lockdown #43736

Merged
merged 2 commits into from
Nov 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions cookbooks/cdo-apps/templates/default/crontab.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
cronjob at:'*/2 * * * *', do:pegasus_dir('sites','virtual','collate_pdfs')
cronjob at:'0 14,15 * * *', do:deploy_dir('bin', 'cron', 'update_dotd')
cronjob at:'0 * * * *', do:deploy_dir('bin', 'cron', 'start_broken_link_checker'), notify:'dev+crontab@code.org'
cronjob at:'0 20 * * 1-5', do:deploy_dir('bin', 'cron', 'commit_content')
cronjob at:'*/1 * * * *', do:deploy_dir('bin', 'cron', 'update_dts')
cronjob at:'0 17 * * *', do:deploy_dir('bin', 'cron', 'commit_trusted_proxies')
end
Expand All @@ -67,20 +66,10 @@
end

if node.chef_environment == 'test' && node.name == 'test' # 'real' test only
# This should be run shortly after the commit_content job run on levelbuilder.
cronjob at:'20 23 * * 1-5', do:deploy_dir('bin', 'cron', 'deploy_to_levelbuilder')
cronjob at:'*/2 * * * 1-5', do:deploy_dir('bin', 'cron', 'deploy_to_test')
cronjob at:'*/5 * * * *', do:deploy_dir('bin', 'snapshot')
end

if node.chef_environment == 'levelbuilder'
cronjob at:'0 20 * * 1-5', do:deploy_dir('bin', 'cron', 'commit_content')
cronjob at:'18 23 * * 1-5', do:deploy_dir('bin', 'cron', 'commit_content')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the purpose of this line is to avoid merge conflicts during DTL when incoming changes touch files which have uncommitted local changes on the levelbuilder machine. so, I think your best options are:

  1. also disable deploy_to_levelbuilder on line 71, or
  2. re-enable line 78 here, and if levelbuilder content does need to be scooped, do a more precise cherry-pick from what you see in the levelbuilder branch when you want to scoop changes in from levelbuilder.

I would suggest starting with (1), and if we need to DTL at some point during lockdown, it will be easy to add back lines 71 and 78 to transition into option 2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @code-dot-org/ed-programs-tools in case anyone would like to advocate for keeping DTLs going during lockdown. of course, levelbuilder would only be getting updated from changes merged to staging, not staging-next.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if you go with option 1, I think it would be a little easier to leave the if clause and just comment out the lines you don't want, so that it is easier to restore bit by bit later if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My memory is that curriculum (level builder) content that needs to be released during the lockdown needs to be hand staged, committed, and pushed on the levelbuilder server since there may be unrelated content changes that we would not want to blanket scoop on level builder.

Copy link
Contributor Author

@sureshc sureshc Nov 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from hand selecting the level builder content to commit/push, I think the Developer of the Day will use the commands in the Developer of the Day script to commit/push/merge content during the lockdown period, and then we would re-enable our content pipeline by reverting this entire Pull Request after Hour of Code.

# This should be run shortly after the commit_content job, running on both levelbuilder and
# staging.
cronjob at:'5 20 * * 1-5', do:deploy_dir('bin', 'cron', 'merge_lb_to_staging')
end

if node.chef_environment == 'production' # production daemon
cronjob at:'20 */4 * * *', do:deploy_dir('bin', 'cron', 'activity-monitor')
cronjob at:'30 14 * * *', do:dashboard_dir('bin','scheduled_pd_workshop_emails')
Expand Down