Conversation
…eing in another region.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
…eing in another region.
…eing in another region.
There was a problem hiding this comment.
Pull Request Overview
Adds cross-region SNS support via a watchdog Lambda, enhances API call resilience, and updates docs
- Append
return_timeoutto ONTAP API endpoints and streamlinevolumeRecordshandling - Introduce CloudFormation watchdog Lambda with IAM role and permissions to publish to SNS in another region
- Update README for the new watchdog feature and correct the Lambda layer link
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| monitor_ontap_services.py | Added return_timeout query parameter to all API endpoints and refactored storage utilization to use volumeRecords |
| cloudformation.yaml | Defined watchdog IAM role, Lambda, permission, and new watchdogRoleArn parameter; wired alarm to invoke it |
| README.md | Fixed download URL path, added watchdog feature description, and refined parameter table |
Files not reviewed (1)
- Monitoring/monitor-ontap-services/updateMonOntapServiceCFTemplate: Language not supported
Comments suppressed due to low confidence (3)
Monitoring/monitor-ontap-services/cloudformation.yaml:27
- [nitpick] Parameter names use PascalCase, so
watchdogRoleArnshould be renamed toWatchdogRoleArnfor consistency with other parameters.
- - watchdogRoleArn
Monitoring/monitor-ontap-services/README.md:77
- Typo: 'aother' should be 'another'.
- - Create a Lambda function to send the CloudWatch alarm alert to an SNS topic. This is done so the SNS topic can be in aother region since CloudWatch doesn't support doing that natively.
Monitoring/monitor-ontap-services/cloudformation.yaml:354
CreateWatchdogAlarmcondition is not defined in theConditionssection; this will cause deployment errors. Define it or use the appropriate existing condition.
Condition: CreateWatchdogAlarm
Comment on lines
+888
to
890
| for record in volumeRecords: | ||
| if rule[key] and record["state"].lower() == "offline": | ||
| uniqueIdentifier = f'{record["uuid"]}_{key}_{rule[key]}' |
There was a problem hiding this comment.
This loop does not guard against volumeRecords being None if the initial API call failed. Consider checking if volumeRecords: before iterating to avoid a runtime error.
Suggested change
| for record in volumeRecords: | |
| if rule[key] and record["state"].lower() == "offline": | |
| uniqueIdentifier = f'{record["uuid"]}_{key}_{rule[key]}' | |
| if volumeRecords: | |
| for record in volumeRecords: | |
| if rule[key] and record["state"].lower() == "offline": | |
| uniqueIdentifier = f'{record["uuid"]}_{key}_{rule[key]}' |
…eing in another region.
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.
No description provided.