OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
11 stars 20 forks source link

Define the Response Process for the Team to Handle Slack Notifications of Red Hat's LSP4IJ List of PRs #810

Open vaisakhkannan opened 3 weeks ago

vaisakhkannan commented 3 weeks ago

This issue is Part of Issue #802 ( Workitem 3) We should define the response process for the team for handling these alerts. What actions do we need to take on our end? Is there a way to ensure that someone on the team takes these actions (i.e. re-alert the channel if no one completes the required action within a certain time frame?)

vaisakhkannan commented 3 weeks ago

Discussion was held with the Kochi Team regarding this Work Item

Approach 1: Check the possibility of adding Yes or No buttons to the Slack notification. The Yes button should be pressed if someone in the team has visited the PR and reviewed the changes. This way, there will be no further reminders about the same PR in the Slack channel. If no one presses Yes, set a timeframe to send another notification reminding the channel about the same PR. Ensure to press the Yes button after viewing the PR and changes; otherwise, we will ignore the PR. It's uncertain if automating the reminder for each PR is achievable.

Approach 2: Set a daily reminder to visit the Red Hat repository's Open PR List at https://github.com/redhat-developer/lsp4ij/pulls to keep track of changes.

Approach 3: Workflow Builder: Slack's Workflow Builder enables you to create automated workflows without code. We can set up triggers and actions to automate processes like approvals, form submissions, and notifications.

vaisakhkannan commented 2 weeks ago

Found a way to trigger Slack’s Workflow Builder

There is an option in Slack called Webhook, which we need to use for creating the Slack Workflow Builder. After creation, we will receive a Webhook URL. We can use this Webhook URL within the workflow file of GitHub Actions (GHA). This will trigger notifications in Slack for both Open and Closed PRs and triggering the created Slack Workflow Builder at the same time as the GHA workflow runs.

Screenshot 2024-06-13 at 5 19 15 PM
vaisakhkannan commented 2 weeks ago

Ideas suggested by Toronto team



Someone need to review the PR updates to see if there are any actions that need to be taken by the team (i.e. code changes on our end, discussion with Red Hat, etc). So, the team discussed this a bit further and decided on the following for now:

  1. The Toronto team will start off with rotating 1 person a week monitoring the lsp4ij alerts to see if any further action is necessary on the issues or PRs in the lsp4ij repo.
  2. It would be great if there was a reminder that started at 9am ET that kept going off every hour (or some other time interval) until it was shut off by the reviewer, indicating that they have reviewed the PRs.
  3. It would be a bonus if the the reminder just tagged whoever is on monitoring duty that week (instead of the whole channel)
vaisakhkannan commented 2 weeks ago

When I tried implementing Step 2 and Step 3, I found some relevant points during investigations.

  1. We can only set a reminder daily, or otherwise, we need to use multiple reminders set in Slack. That means we can’t set a reminder that starts at 9 AM ET and keeps going off every hour using Slack.
  2. However, we can set another cron job file trigger with schedules based on starting at 9 AM ET and repeating every hour.

For example: - cron: '30 9-11 * * 1-5' This schedule ensures that the workflow will run at 9:30 AM, 10:30 AM, and 11:30 AM on weekdays.

  1. We can’t specify a condition to stop the schedule that would shut it off by the reviewer, indicating that they have reviewed the PRs. (There is no similar kind of feature in Slack as well.)

  2. So, if we set reminders as schedules in workflows for 3 times daily, it reminds all 3 times. But the problem is, if the reviewer already seen the PR changes and responded in the first reminder itself, the remaining two are actually wasted and which will also make noise in the channel.

  3. Similarly, if we set multiple reminders in Slack also, this issue persists. There is no way to stop the reminder automatically if the reviewer confirms.

  4. Additionally, we can’t tag someone in the reminder to notify because the reviewer will rotate every week. If we plan to tag someone in the reminder, we need to manually update the Slack ID of someone in the workflow builder every week.