Email newsletter
We send out email newsletters once a quarter to announce major new features to all our users and help them keep in touch with the platform.
Sample newsletters¶
A sample newsletter is located at https://github.com/codalab/codalab-worksheets/blob/master/docs/blog/2020-fall.md.
Drafting a newsletter¶
Create a pull request in the codalab/deployment
repository with the draft contents of your email newsletter. This way, we can draft and iterate on the contents of this newsletter before making it public.
Once the newsletter is approved, create a pull request on the codalab/codalab-worksheets
repository with the newsletter contents. The newsletter should be named YYYY-[quarter].md
(for example, 2020-fall.md
) and be located in the docs/blog folder.
Sending a newsletter¶
Once the newsletter is merged, wait until a new version of CodaLab is deployed to prod. Now, it's time to send the newsletter through email.
SSH into the prod server and go to the main Docker container shell:
azure/ssh.sh vm-clws-prod-server-0
docker exec -it codalab_rest-server_1 /bin/bash
Then, send out a test email to everyone on the CodaLab team:
python scripts/send-email-notifications.py \
--subject "[TEST] Fall 2020 CodaLab Worksheets Newsletter" \
--body-file docs/blog/2020-fall.md \
--sent-file sent.jsonl \
--emails pliang@cs.stanford.edu,ashwin99@stanford.edu,tonyhlee@stanford.edu,levilian@stanford.edu,nfliu@stanford.edu,yuqijin@stanford.edu \
--threshold 2 \
--doit
Finally, send out the real email. This step might take a while (up to 30 mins), because it sends emails to all 10,000+ users.
rm sent.jsonl
python3 scripts/send-email-notifications.py \
--subject "CodaLab Worksheets Newsletter - Fall 2020" \
--body-file docs/blog/2020-fall.md \
--sent-file sent.jsonl \
--threshold 2 \
--doit
Sending newsletters without deploying to prod¶
If you need to fix small typos in the email newsletter without deploying everything to prod again, you can always just push your changes to a branch and then use wget
to download the latest version of the email contents into the container:
docker exec -it codalab_rest-server_1 /bin/bash
apt update && apt install wget
wget https://raw.githubusercontent.com/codalab/codalab-worksheets/1ee6007c4cd338750d4b4788e915b18cdbad010a/docs/blog/2020-fall.md -O docs/blog/2020-fall.md
python3 scripts/send-email-notifications.py ....