-
Notifications
You must be signed in to change notification settings - Fork 166
Add runbook name field #1560
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 runbook name field #1560
Conversation
| disabled: true, | ||
| options: [], | ||
| placeholder: 'Failed to load runbooks', | ||
| error: String(error), |
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.
I think this will be [Object Object]. Try:
extractPropertyString(error, ['message']) || 'Some default error',
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.
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.
Here’s why:
- The global String() function calls the object’s toString() method if it exists.
- For a regular Error instance, Error.prototype.toString() returns something like "Error: message".
I think it's ok to assume it will always be an Error instance
| return { | ||
| disabled: false, | ||
| options: docs.map((d: DocumentIdentifier) => ({ | ||
| label: d.Name || 'Unknown', |
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.
if its unknown wouldnt we not want it in the list? we could potentially have multiple unknowns in the list else
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.
Fixed
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.
Pull Request Overview
This PR adds support for AWS Systems Manager (SSM) runbook selection by introducing a new runbookName property field along with supporting infrastructure for fetching and managing SSM documents. The changes enable users to authenticate, select a region and owner, and then choose from available SSM Automation runbooks.
Key Changes:
- Added
@aws-sdk/client-ssmdependency (version 3.919.0) and associated license updates - Implemented core SSM document management functions (list documents, list versions, describe document)
- Created a new dropdown property for runbook selection with dynamic options loading
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added @aws-sdk/client-ssm dependency |
| THIRD_PARTY_LICENSES.txt | Updated with licenses for new AWS SDK packages and dependencies |
| packages/openops/src/lib/aws/ssm/document-owner.ts | Defined DocumentOwner enum for filtering SSM documents |
| packages/openops/src/lib/aws/ssm/get-ssm-documents.ts | Implemented function to fetch SSM documents with filtering |
| packages/openops/src/lib/aws/ssm/get-ssm-document-versions.ts | Implemented function to retrieve document version history |
| packages/openops/src/lib/aws/ssm/get-ssm-describe-document-info.ts | Implemented function to fetch document parameters |
| packages/openops/src/lib/aws/ssm/runbook-name-property.ts | Created dropdown property with dynamic options for runbook selection |
| packages/openops/test/aws/ssm/get-ssm-documents.test.ts | Added comprehensive tests for document fetching functionality |
| packages/openops/test/aws/ssm/get-ssm-document-versions.test.ts | Added tests for document version retrieval |
| packages/openops/test/aws/ssm/get-ssm-describe-document-info.test.ts | Added tests for document description functionality |
| packages/openops/test/aws/ssm/runbook-name-property.options.test.ts | Added tests for runbook property options loading behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # packages/openops/src/lib/aws/ssm/get-ssm-describe-document-info.ts # packages/openops/src/lib/aws/ssm/get-ssm-document-versions.ts # packages/openops/src/lib/aws/ssm/get-ssm-documents.ts
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |

Part of OPS-2931