sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

saved searches: email configuration only picked up after hard reload #4121

Open mrnugget opened 5 years ago

mrnugget commented 5 years ago

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": "noreply@sourcegraph.com",
    "email.smtp": {
        "authentication": "PLAIN",
        "host": "smtp.example.com",
        "password": "supersecretpassword",
        "port": 9999,
        "username": "email-username"
    },
  7. Again go to /search/searches, click Add new search, use type:diff foobar as search query
  8. Check the checkbox next to Email notifications
  9. BUG: see the warning again that emails are not configured
  10. Do a hard reload in Chrome (Cmd+Shift+R)
  11. Again go to /search/searches, click Add new search, use type:diff foobar as search query
  12. Check the checkbox next to Email notifications
  13. 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

github-actions[bot] commented 3 years ago

Heads up @alicjasuska @felixfbecker @umpox @valerybugakov @5h1ru @pdubroy - the "team/frontend-platform" label was applied to this issue.