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

Add workflow step to notify on Automated Test failure #1585

Merged
merged 8 commits into from
Nov 18, 2024

Conversation

basiliskus
Copy link
Contributor

@basiliskus basiliskus commented Nov 14, 2024

Description

So the eng. team is notified when the Automated Staging Test - Run integration tests action fails, we're adding a Slack incoming webhook that will send a notification to the cdcti-alerts-nonprod slack channel on test failure. I've tested it and it's working

Issue

#1528

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1528 - Partially compliant

Fully compliant requirements:

  • Look into adding a Slack Webhook to use in the workflow and notify the cdcti-alerts-nonprod slack channel

Not compliant requirements:

  • Look into adding people to notify using CODEOWNERS file
  • Look into sending an email on test failure in the workflow
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing Configuration
The Slack notification step lacks configuration for the message format and content.

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Enhancement
Add a detailed payload to the Slack notification to provide useful debugging information

Ensure that the payload for the Slack notification includes meaningful information
about the test failure to help in debugging. Currently, the payload is not
specified, which might result in sending a generic or empty message.

.github/workflows/automated-staging-test-run.yml [24-26]

 uses: slackapi/[email protected]
 with:
   payload-delimiter: "_"
+  payload: '{"text": "Automated test failed: ${{ github.workflow }} at ${{ github.run_id }}"}'
Suggestion importance[1-10]: 8

Why: Adding a detailed payload to the Slack notification is crucial for debugging. The suggestion correctly identifies a missing part in the PR and provides a meaningful improvement by specifying what should be included in the payload.

8

@basiliskus basiliskus marked this pull request as ready for review November 18, 2024 23:15
Copy link
Contributor

@pluckyswan pluckyswan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice dude!

@basiliskus basiliskus merged commit 6f741e0 into main Nov 18, 2024
17 checks passed
@basiliskus basiliskus deleted the story/1528/notify-on-failure branch November 18, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants