Skip to content

saved searches: email configuration only picked up after hard reload

Created by: mrnugget

  • Sourcegraph version: 3.4.0
  • Platform information: Fresh Sourcegraph Docker instance, Google Chrome Version 74.0.3729.157

Steps to reproduce:

  1. Setup a fresh Sourcegraph instance, add an external service, make sure repositories are cloned
  2. Go to /search/searches, click Add new search
  3. Type in type:diff foobar as a search query
  4. Check the checkbox next to Email notifications
  5. See warning: Warning: Sending emails is not currently configured on this Sourcegraph server. Use the email.smtp site configuration setting to enable sending emails.
  6. Go to /site-admin/configuration, add an email configuration and save:
"email.address": "[email protected]",
  "email.smtp": {
  	"authentication": "PLAIN",
  	"host": "smtp.example.com",
  	"password": "supersecretpassword",
  	"port": 9999,
  	"username": "email-username"
  },
  1. Again go to /search/searches, click Add new search, use type:diff foobar as search query
  2. Check the checkbox next to Email notifications
  3. BUG: see the warning again that emails are not configured
  4. Do a hard reload in Chrome (Cmd+Shift+R)
  5. Again go to /search/searches, click Add new search, use type:diff foobar as search query
  6. Check the checkbox next to Email notifications
  7. See no warning

Expected behavior:

I don't need to do a reload after saving the configuration

Actual behavior:

The saved searches form is not picking up on the updated site config until I do a reload