Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit Faster only_one exit sure made this cronjob complete quickly! 😝
This problem was introduced in #32091 on Dec 2, 2019. To confirm that I wasn't just having this problem locally, I looked at the
contained_levels
table in the staging DB and confirmed that a level group created before December does appear there, and a level group created after December does not.Why didn't we catch this? It's fair to say that every single person on our team has missed it, because the cronjob has been failing every time it's run since December, and an error has been logged to HoneyBadger every time: https://app.honeybadger.io/projects/45435/faults?sort=last_seen_desc&q=create_rollup_tables
Future work
Testing story
Manually ran this cronjob locally. Before this change it generated no rows:
after this change, it generates:
on the staging machine, this table has only 2620 entries. The higher number generated locally is probably due to all the level groups created by cloning the 2019 curriculum to create the 2020 curriculum, which generally happens between January and March.
Reviewer Checklist: