Skip to content

Conversation

@rSnapkoOpenOps
Copy link
Collaborator

Part of OPS-2931

@linear
Copy link

linear bot commented Nov 4, 2025

@rSnapkoOpenOps rSnapkoOpenOps changed the base branch from main to feat/add-ssm-document-helpers November 4, 2025 15:18
@rSnapkoOpenOps rSnapkoOpenOps marked this pull request as ready for review November 4, 2025 15:19
disabled: true,
options: [],
placeholder: 'Failed to load runbooks',
error: String(error),
Copy link
Contributor

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',

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it's fine

image

Copy link
Contributor

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',
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Base automatically changed from feat/add-ssm-document-helpers to main November 5, 2025 08:42
Copilot AI review requested due to automatic review settings November 5, 2025 08:48
Copy link
Contributor

Copilot AI left a 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-ssm dependency (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
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@bigfluffycookie bigfluffycookie self-requested a review November 5, 2025 08:54
@rSnapkoOpenOps rSnapkoOpenOps merged commit 08f8a70 into main Nov 5, 2025
21 checks passed
@rSnapkoOpenOps rSnapkoOpenOps deleted the feat/add-runbook-name-field branch November 5, 2025 11:32
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.

4 participants