fixes CNVS-49087
flag = none
implement deep freezing
for the config values to
stop the pollution
dup all the locations
where the config is either
modified or passed off to
some other library where
it's not clear it was loaded
from a frozen config file
TEST PLAN:
1) load a config file
2) try to change it's key/vals
3) you can't because it's frozen
Change-Id: I15faa230e3c99fe4806154493e238cecec526d1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236341
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs CNVS-13024
Setting wasn't properly being initialized as unsharded because
it was loading before Switchman. The reason we need Setting before
switchman is just for yaml loading, so split that into its own
class.
Change-Id: I5456e103cb216dba2d5af4e9c20a697b468c923b
Reviewed-on: https://gerrit.instructure.com/35043
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-12182
test plan
- regression test on incoming mail
- use script/process_incoming_emails to manually trigger the processing
of incoming mail
Change-Id: Iccd74d8fe2b5af3d5eefe25a2736273e3bf559b0
Reviewed-on: https://gerrit.instructure.com/32794
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
replaced the mailman gem with custom code with more error
handling. this will allow the incoming message processor to
continue processing messages after encountering a message with
an encoding or parsing error. the broken messages will be moved
aside to a separate folder for later inspection.
fixes CNVS-4970
test plan:
- read up on the new incoming_mail.yml configuration settings.
- configure incoming_mail.yml with the test imap accounts
using legacy settings and check for regressions.
- reconfigure incoming_mail.yml to read from a directory.
- copy some testing email files into the configured directory.
test files should be a mix of:
- emails with encoding errors
- emails with syntax errors
- normal emails
- all of the normal emails should be processed normally
- all of the error emails should be moved into the error
subdirectory
Change-Id: I0f946a56b41492f007db2775aa6da3cdfa4fdd3f
Reviewed-on: https://gerrit.instructure.com/19729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fixes CNVS-3781
test plan:
- See test email accounts on the IncomingMessageProcessor wiki
page.
- Configure config/incoming_mail.yml with multiple test email
accounts as specified in the incoming_mail.yml.example file
(the config should be in the development section).
- Restart rails to pick up the new configuration.
- Set a student's notifications for discussion topics to ASAP.
- Create a new discussion topic.
- Go to /messages for the student and find the notification
for the new discussion topic.
- Copy the "+" data from the reply-to field. For example, from
"notifications+deadbeef-4242@example.com" you would copy
"+deadbeef-4242"
- Send a real email to one of the test accounts, adding the
"+" data to the address. For example "test1@example.com"
would become "test1+deadbeef-4242@example.com"
- After 1 minute, the IncomingMessageProcessor should pull the
message from the test account and post the body of the email
message to the discussion.
- Send another email as above but to a different test account
you've configured. It should also appear in the discussion.
- Reconfigure incoming_mail.yml with one account as it appears
in the original production settings. Restart rails and make
sure this configuration still works.
- When you're done testing, remove your
config/incoming_mail.yml file and restart rails.
Change-Id: Ie4a584c32bf0cc7025619341584d454cf15ce07f
Reviewed-on: https://gerrit.instructure.com/17714
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
This still logs a bunch of annoying info-level messages once a minute,
but at least they go to the defined logger now instead of stdout
Change-Id: If5dfd32f22497d2e6031005a8467aab51d40859d
Reviewed-on: https://gerrit.instructure.com/3936
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
* Uses Mailman gem
* Can be configured for POP3, Maildir, or stdin (push from mailserver)
* Maildir can be chained with fetchmail or similar to support IMAP
* Can be run as part of the job server, or as a separate process
Change-Id: I000000000000000000000000000001
Reviewed-on: https://gerrit.instructure.com/2971
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>