Refactor Slack Alerting and support it in new integration framework#979
Merged
garrrikkotua merged 3 commits intomainfrom Jun 13, 2023
Merged
Refactor Slack Alerting and support it in new integration framework#979garrrikkotua merged 3 commits intomainfrom
garrrikkotua merged 3 commits intomainfrom
Conversation
themarolt
approved these changes
Jun 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at aff9074
This pull request adds a new local package
@crowd/alertingto the backend and the integration run worker services. This package provides a function to send Slack alerts for different types of integration events, such as errors, warnings, successes, and data checks. The pull request also refactors the existing Slack alerting logic in the backend and the integration run worker services to use the new package. Additionally, the pull request adds some user context information, such as the tenant plan and name, to the Slack alerts. Finally, the pull request adds some configuration files and scripts for the new package, such as ESLint, Prettier, TypeScript, and a build script.
🤖 Generated by Copilot at aff9074
Why
How
🤖 Generated by Copilot at aff9074
@crowd/alertingpackage to theservices/libs/alertingfolder, containing a function and types for sending Slack alerts for different types of integration events (F11-F17)@crowd/alertingpackage to thebackend/package.jsonandservices/apps/integration_run_worker/package.jsonfiles, using local file paths (link, link)@crowd/alertingpackage and its dependencies to thebackend/package-lock.jsonandservices/apps/integration_run_worker/package-lock.jsonfiles, using symbolic links and file prefixes (link, link, link, link, link, link, link, link, link, link, link)alertinglibrary to theservices/scripts/build_libs.shfile, to build the TypeScript library (link)sendSlackAlertandSlackAlertTypesfunctions from the@crowd/alertingpackage in the files that handle integration runs and data checks, and remove the unused imports from the oldslackAlertsfile (link, link, link, link, link)SLACK_ALERTING_CONFIGconstant to thebackend/src/confandservices/apps/integration_run_worker/src/conffolders, containing the Slack alerting URL from theCROWD_SLACK_ALERTING_URLenvironment variable (link, link)slackAlertingconfiguration to theservices/apps/integration_run_worker/config/custom-environment-variables.jsonfile, mapping theurlproperty to theCROWD_SLACK_ALERTING_URLenvironment variable (link)sendSlackAlertfunction in the files that handle integration runs and data checks, passing an object with the Slack alerting URL, the alert type, the integration information, the user context, the logger, the framework version, and the data checker settings (link, link, link)services/apps/integration_run_worker/src/repofolder, containing the tenant plan, the trial flag, and the tenant name, to provide the user context for the Slack alerts (link, link)Checklist ✅
Feature,Improvement, orBug.