On-call queries have repetitive issues such as whitelisting of emails etc. which can be solved with automation.
Closes ISOM-1037
Solution
Introduce a new bot service which serves a private org Slackbot with shortcut commands. This will empower Ops to perform these repetitive queries themselves. Going forward, any automations can be added to this service.
To whitelist emails, we can now enter /whitelist-emails email1@xyz.com,2024-06-22 email2@abc.com,2025-01-31 and so on. Note that the exp date is in the format of YYYY-MM-DD.
Breaking Changes
[ ] Yes - this PR contains breaking changes
Details ...
[X] No - this PR is backwards compatible with ALL of the following feature flags in this doc
Features:
Details ...
Improvements:
Details ...
Bug Fixes:
Details ...
Before & After Screenshots
BEFORE:
AFTER:
Tests
After deployment to staging, update the URL of the app to be the staging BE API on Slack's config page. E.g. <staging-api>/v2/isobot/whitelist-emails
On Slack, find IsoBot app
Click on the Messages tab and type /whitelist-email
Enter a sample whitelist query as shown in above image as per instructions
Check staging DB to ensure the entries are in correctly
Deploy Notes
Note that for this to work, we need to edit the endpoint for the /whitelist-emails command on Slack's config pages. This should be updated to the CMS BE endpoint instead.
New environment variables:
SLACK_SIGNING_SECRET: required to verify the incoming message is from our Slackbot. Note that this has yet to be added on 1PW or SSM. Requires to be added before deployment to staging & prod.
[ ] added env var to 1PW + SSM script (fetch_ssm_parameters.sh)
Problem
On-call queries have repetitive issues such as whitelisting of emails etc. which can be solved with automation.
Closes ISOM-1037
Solution
Introduce a new bot service which serves a private org Slackbot with shortcut commands. This will empower Ops to perform these repetitive queries themselves. Going forward, any automations can be added to this service.
To whitelist emails, we can now enter
/whitelist-emails email1@xyz.com,2024-06-22 email2@abc.com,2025-01-31
and so on. Note that the exp date is in the format of YYYY-MM-DD.Breaking Changes
Features:
Improvements:
Bug Fixes:
Before & After Screenshots
BEFORE:
AFTER:
Tests
<staging-api>/v2/isobot/whitelist-emails
IsoBot
appDeploy Notes
Note that for this to work, we need to edit the endpoint for the /whitelist-emails command on Slack's config pages. This should be updated to the CMS BE endpoint instead.
New environment variables:
SLACK_SIGNING_SECRET
: required to verify the incoming message is from our Slackbot. Note that this has yet to be added on 1PW or SSM. Requires to be added before deployment to staging & prod.fetch_ssm_parameters.sh
)