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

Stop logging authorized_teacher permissions to slack #20310

Merged
merged 2 commits into from Jan 31, 2018
Merged

Conversation

balderdash
Copy link
Contributor

@balderdash balderdash commented Jan 30, 2018

This PR stops logging to slack when a teacher gets the 'authorized_teacher' permission. It also fixes the bug that logged each new permission to slack twice.

Over the last couple months, 1152 new user permissions have been created, of which 1123 were authorized teacher. Most of those were created in 5 large batches of ~200 teachers each:

mysql> SELECT permission,month(created_at),day(created_at),COUNT(0) FROM user_permissions WHERE created_at > '2017-12-1' AND permission='authorized_teacher' GROUP BY month(created_at), day(created_at);
+--------------------+-------------------+-----------------+----------+
| permission         | month(created_at) | day(created_at) | COUNT(0) |
+--------------------+-------------------+-----------------+----------+
| authorized_teacher |                 1 |               2 |        1 |
| authorized_teacher |                 1 |               3 |        4 |
| authorized_teacher |                 1 |               4 |      184 |
| authorized_teacher |                 1 |               7 |        1 |
| authorized_teacher |                 1 |               8 |        1 |
| authorized_teacher |                 1 |               9 |        1 |
| authorized_teacher |                 1 |              10 |        3 |
| authorized_teacher |                 1 |              11 |        2 |
| authorized_teacher |                 1 |              12 |      195 |
| authorized_teacher |                 1 |              16 |        1 |
| authorized_teacher |                 1 |              17 |        2 |
| authorized_teacher |                 1 |              18 |        2 |
| authorized_teacher |                 1 |              19 |        1 |
| authorized_teacher |                 1 |              20 |        5 |
| authorized_teacher |                 1 |              22 |        5 |
| authorized_teacher |                 1 |              23 |        2 |
| authorized_teacher |                 1 |              24 |      243 |
| authorized_teacher |                 1 |              25 |        2 |
| authorized_teacher |                 1 |              29 |        3 |
| authorized_teacher |                 1 |              30 |        3 |
| authorized_teacher |                12 |               2 |        1 |
| authorized_teacher |                12 |               4 |        1 |
| authorized_teacher |                12 |               6 |      259 |
| authorized_teacher |                12 |               7 |        1 |
| authorized_teacher |                12 |               8 |        1 |
| authorized_teacher |                12 |               9 |        1 |
| authorized_teacher |                12 |              12 |        1 |
| authorized_teacher |                12 |              13 |        1 |
| authorized_teacher |                12 |              15 |      193 |
| authorized_teacher |                12 |              20 |        2 |
| authorized_teacher |                12 |              26 |        1 |
+--------------------+-------------------+-----------------+----------+

These batches of new permissions end up spamming the #infra-security room, making it very difficult for casual observers to spot unexpected permission changes as they scroll by. While it's good to have a log of permissions changes (perhaps we should send authorized_teacher changes to firehose instead?), the slack room is much more useful if we actually have the time to see everything that gets logged to it.

@balderdash balderdash merged commit 9084040 into staging Jan 31, 2018
@balderdash balderdash deleted the log-spam branch February 2, 2018 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants