-
Notifications
You must be signed in to change notification settings - Fork 53
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
fix:[CORE-2050][Azure-Collector-Issue]Adding "Unauthorized" errorcodes/messages to Datadog omission List #2263
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe modifications in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ErrorManageUtil
Note over User,ErrorManageUtil: Permission Denied Scenario
User ->> ErrorManageUtil: triggerNotificationPermissionDenied
ErrorManageUtil ->> ErrorManageUtil: Check exceptions (Unauthorized, Forbidden, ForbiddenByRbac)
ErrorManageUtil -->> User: Notify Permission Denied
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java (1 hunks)
Additional comments not posted (1)
jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java (1)
136-136
: Ensure the newly added exception strings align with the intended error handling logic.Verification successful
The search results indicate multiple instances of the terms "Unauthorized", "Forbidden", and "ForbiddenByRbac" across different files. Specifically, in the
ErrorManageUtil.java
file, the addition of these exception strings appears consistent with the intended logic for error handling.
jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java
: The new exception strings are added to theexceptionList
.Based on this, the newly added exception strings align with the intended error handling logic in the
ErrorManageUtil.java
file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage and impact of the newly added exception strings in the entire codebase. # Test: Search for the usage of the newly added exception strings. Expect: Consistent usage and handling across the codebase. rg --type java -e "Unauthorized" -e "Forbidden" -e "ForbiddenByRbac"Length of output: 1832
jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- jobs/azure-discovery/src/main/java/com/tmobile/pacbot/azure/inventory/util/ErrorManageUtil.java
Quality Gate passedIssues Measures |
Description
This is related to https://paladincloud.atlassian.net/browse/CORE-2050 where vertex azure collector throwing datadog alerts due to "UnAuthorized" exception such as 401/403 error codes. These error codes should be excluded from datadog alerts because we are triggering notification for those alerts.
Problem
Some of the error codes are not in exclusion list.Detailed root causes are documented in this https://docs.google.com/spreadsheets/d/1dKZwK_bFE_4YRjyQX91vwYYdSxqSZEdVuyDeeZXxSb0/edit#gid=0
<style type="text/css"></style>
Solution
Adding additional error codes (401/403) to omission list
Fixes # (issue if any)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration
Checklist:
Other Information:
List any documentation updates that are needed for the Wiki
Summary by CodeRabbit