Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform][Alerts] Repeat notifications after previous failures + code cleanup #9198

Open
SergeyPotachev opened this issue Jul 7, 2021 · 0 comments
Assignees
Labels
area/platform Yugabyte Platform
Milestone

Comments

@SergeyPotachev
Copy link
Contributor

Code cleanup:

  1. To extract AlertRouteService;
  2. Still have some TODOs in code. As example, about possible sensitive data in receivers returned as plain text;
@SergeyPotachev SergeyPotachev added the area/platform Yugabyte Platform label Jul 7, 2021
@SergeyPotachev SergeyPotachev self-assigned this Jul 7, 2021
@hsu880 hsu880 added this to the 2.7.x milestone Jul 9, 2021
SergeyPotachev added a commit that referenced this issue Jul 14, 2021
…s + code cleanup

Summary:
  Code cleanup in AlertController and AlertRoute (introducing AlertRouteService).

Test Plan:
  No specific tests required for this commit. Only to verify the alerts API functionality.

Reviewers: amalyshev

Reviewed By: amalyshev

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D12212
SergeyPotachev added a commit that referenced this issue Jul 22, 2021
Summary:
  - Implemented repeats of notifications sending in case the current attempt is failed;

Test Plan:
Test scenario:

  - Remove all recipients from the customer's configuration;
  - Raise any alert on a universe;
  - Check that the alert appeared on the `Alerts` page in YW;
  - Check that another alert appeared on the `Alerts` page (with the text like "Unable to notify
    about alert(s) using default route, there are no recipients configured in the customer's
    profile.");
  - Setup recipients in the customer's configuration;
  - Wait for ~3 minutes;
  - Check that:
     - Only one alert left on the `Alerts` page (not related to the problem with notifications);
     - Another alert (related to the problem with recipients) disappeared;
     - You have received an email with the alert firing message.
  - Resolve the alert on the universe;
  - Check that:
     - The alert notification disappeared from the `Alerts` page;
     - You have received an email with the alert resolved message.

Reviewers: amalyshev

Reviewed By: amalyshev

Subscribers: yugaware, jenkins-bot

Differential Revision: https://phabricator.dev.yugabyte.com/D12252
SergeyPotachev added a commit that referenced this issue Aug 17, 2021
Summary:
  - Sensitive data in SMTP settings of alert receivers (and other fields in the future) is masked using asterisks.

Test Plan:
  1. Create alert receiver with type Email and SMTP settings;
  2. Check that it works (SMTP settings are correctly used) - using alert emulation or checking data
     directly in DB;
  3. Get alert receivers using:
       GET /customers/:cUUID/alert_receivers
     and
       GET /customers/:cUUID/alert_receivers/{your receiver UUID}

     Check that answers don't have passwords as a plain text.
  4. Update the alert receiver password using direct API request;
  5. Check that the password has been updated.

Reviewers: amalyshev

Reviewed By: amalyshev

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D12607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform Yugabyte Platform
Projects
None yet
Development

No branches or pull requests

2 participants