[Bugfix:System] Set Initial Gradeable Notification State#11852
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11852 +/- ##
=========================================
Coverage 20.70% 20.70%
Complexity 9191 9191
=========================================
Files 265 265
Lines 35215 35215
Branches 458 458
=========================================
Hits 7292 7292
Misses 27469 27469
Partials 454 454
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Chriun
approved these changes
Jul 9, 2025
Chriun
left a comment
Contributor
There was a problem hiding this comment.
Tested and it does successfully remove all notifications for sample courses when running recreate_sample_courses/installing new VM.
williamschen23
pushed a commit
that referenced
this pull request
Jul 18, 2025
<!-- Include any GitHub issue that is fixed/closed using "Fixes Alternately write "Partially addresses #<number>" or "Related to The initial sample data insertion for gradeables doesn't account for the existing notification state. Therefore, all gradeables released in the past will have their release flag initialized as false by default, causing the first cron job script run to release them in a large batch for new system installations. Related to #10358.  <!-- Include before & after screenshots/videos if the user interface has changed. --> The installation scripts related to inserting electronic gradeable data for the testing courses will have the notification state set to true if the gradeable release date is in the past, similar to how the initial migration command handled it. new feature? 1. Visit a course database through the CLI to reset notification states or skip the following steps through verification via `vagrant up` - `$ su postgres` - `$ psql` - `$ \c submitty_f25_sample` (update `f25` to suit your existing system) - `$ UPDATE electronic_gradeable_version SET g_notification_sent = FALSE;` 3. Run the `recreate_sample_courses` command as the root user 4. Using the initial steps in step 1, visit the testing database and run the following command to ensure the script worked as intended. - `SELECT * FROM electronic_gradeable_version WHERE g_notification_sent IS TRUE;` (should be non-empty) <!-- Is this feature sufficiently tested by unit tests and end-to-end tests? If this PR does not add/update the necessary automated tests, write a new GitHub issue and link it below. Is this feature sufficiently documented on submitty.org? Link related PRs or new GitHub issue to update documentation. --> N/A <!-- Is this a breaking change? Does this PR include migrations to update existing installations? Are there security concerns with this PR? --> N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why is this Change Important & Necessary?
The initial sample data insertion for gradeables doesn't account for the existing notification state. Therefore, all gradeables released in the past will have their release flag initialized as false by default, causing the first cron job script run to release them in a large batch for new system installations. Related to #10358.
What is the New Behavior?
The installation scripts related to inserting electronic gradeable data for the testing courses will have the notification state set to true if the gradeable release date is in the past, similar to how the initial migration command handled it.
What steps should a reviewer take to reproduce or test the bug or new feature?
vagrant up$ su postgres$ psql$ \c submitty_f25_sample(updatef25to suit your existing system)$ UPDATE electronic_gradeable_version SET g_notification_sent = FALSE;recreate_sample_coursescommand as the root userSELECT * FROM electronic_gradeable_version WHERE g_notification_sent IS TRUE;(should be non-empty)Automated Testing & Documentation
N/A
Other information
N/A