RESOLVED FIXED218227
[ews] Ensure that uat instance doesn't send emails
https://bugs.webkit.org/show_bug.cgi?id=218227
Summary [ews] Ensure that uat instance doesn't send emails
Aakash Jain
Reported 2020-10-27 05:18:09 PDT
uat instance (ews-buidl.webkit-uat.org) is for testing purposes and various times it runs queues/configurations which aren't ready for production yet. We should ensure that uat instance doesn't send emails to users.
Attachments
Patch (1.45 KB, patch)
2020-10-27 05:26 PDT, Aakash Jain
no flags
Patch (1.50 KB, patch)
2020-10-28 06:38 PDT, Aakash Jain
no flags
Patch (1.55 KB, patch)
2020-10-28 08:21 PDT, Aakash Jain
no flags
Aakash Jain
Comment 1 2020-10-27 05:26:55 PDT
Darin Adler
Comment 2 2020-10-27 14:26:23 PDT
Comment on attachment 412414 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412414&action=review > Tools/BuildSlaveSupport/ews-build/send_email.py:52 > + if 'uat' in HOSTNAME: This seems like an imprecise check. Is there no chance that a host might have "uat" as a substring of its name? It’s in words like "graduate".
Keith Rollin
Comment 3 2020-10-27 14:32:35 PDT
Heh. The word that came to my mind was "squat". The domain in question was "https://ews-build.webkit-uat.org". Would it cause problems to look for "ews-build.webkit-uat.org"? Or "webkit-uat.org"? Or "webkit-uat"? or "-uat.org"?
Darin Adler
Comment 4 2020-10-27 14:36:56 PDT
(In reply to Keith Rollin from comment #3) > The domain in question was "https://ews-build.webkit-uat.org". Would it > cause problems to look for "ews-build.webkit-uat.org"? Or "webkit-uat.org"? > Or "webkit-uat"? or "-uat.org"? or "-uat." or /\buat\b/
Aakash Jain
Comment 5 2020-10-28 06:35:43 PDT
(In reply to Keith Rollin from comment #3) > Would it cause problems to look for "ews-build.webkit-uat.org"? Or "webkit-uat.org"? Or "webkit-uat"? or "-uat.org"? Not really. This particular check is specifically for this host. In fact any other host matching this check isn't much of a concern, since almost all other hosts will fail the previous check of is_test_mode_enabled. is_test_mode_enabled is disabled only when BUILDBOT_PRODUCTION env variable is set, which is not set by default. We need to set this variable on uat instance since we need it to mimic production environment (e.g.: reading passwords.json file so that we can easily connect bots to it). Also, no other instance (like local testing instance) should send emails. Instead of disallowing this particular host, I have reverted the check in updated patch to allow only one host: production EWS instance.
Aakash Jain
Comment 6 2020-10-28 06:38:46 PDT
Aakash Jain
Comment 7 2020-10-28 08:21:13 PDT
EWS
Comment 8 2020-10-28 09:17:14 PDT
Committed r269106: <https://trac.webkit.org/changeset/269106> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412529 [details].
Radar WebKit Bug Importer
Comment 9 2020-10-28 09:18:20 PDT
Note You need to log in before you can comment on or make changes to this bug.