Skip to content

Fixed the testresults daily email setting not persisting across server restarts - #696

Merged
vagisha merged 1 commit into
release26.11-SNAPSHOTfrom
26.11_fb_testresults-email-opt-in
Nov 23, 2026
Merged

vagisha merged 1 commit into
release26.11-SNAPSHOTfrom
26.11_fb_testresults-email-opt-in

Conversation

@vagisha

@vagisha vagisha commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Rationale

  • The daily nightly test results email job was scheduled unconditionally at every server startup. The Stop button on the training data page removed the scheduled job without saving that choice, so the job was scheduled again after the next restart. A test server therefore resumed sending the email after each restart.

Changes

  • TestResultsModule.startBackgroundThreads schedules the daily email job only when isEmailEnabled returns true.
  • TestResultsModule.isEmailEnabled reads a site-level property stored with PropertyManager. The email is disabled when no value has been saved.
  • TestResultsController.SetEmailCronAction saves the property as enabled after Start schedules the job, and as disabled after Stop removes the job.
  • SetEmailCronAction logs each change to the setting, including the email address of the site admin who made the change.

Deployment

  • The daily email is disabled by default on every server after this change is deployed. To continue sending the email from skyline.ms, a site admin must open the training data page, select "Email Form" and click Start once. The setting persists across restarts.

Tests

  • Verified manually on a local server.
    • With no saved value, the job is not scheduled after a restart.
    • After Start, the job is scheduled after a restart.
    • After Stop, the job is not scheduled after a restart.

Co-Authored-By: Claude noreply@anthropic.com

* TestResultsModule.startBackgroundThreads schedules the daily email job only when
  isEmailEnabled returns true.
* TestResultsModule.isEmailEnabled reads a site-level property that defaults to off.
* TestResultsController.SetEmailCronAction saves the property on start and stop.
* SetEmailCronAction logs each change with the email of the site admin who made it.

Co-Authored-By: Claude <noreply@anthropic.com>
@vagisha vagisha changed the title Changed the testresults daily email to require a site admin to start it Fixed the testresults daily email setting not persisting across server restarts Nov 22, 2026
@vagisha
vagisha merged commit 610ffbd into release26.11-SNAPSHOT Nov 23, 2026
7 checks passed
@vagisha
vagisha deleted the 26.11_fb_testresults-email-opt-in branch November 23, 2026 16:09
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.

2 participants