Skip to content

Add bulk account roles support to AWS connections - #2443

Open
ravikiranvm wants to merge 6 commits into
mainfrom
ops-4573
Open

Add bulk account roles support to AWS connections#2443
ravikiranvm wants to merge 6 commits into
mainfrom
ops-4573

Conversation

@ravikiranvm

@ravikiranvm ravikiranvm commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes OPS-4753.

Additional Notes

Newly added:

  • A new component to add multiple AWS roles
  • User can add multiple roles which are named after the same name
  • User can input multiple AWS Accounts Ids optionally followed by their Aliases (one account per line)
  • We do not support all IDs in a single line
  • Once all accounts are added, we display cards with role and aliases to user and they can edit if something is wrong
  • If an alias isn't provided, Account ID is used as alias
  • We validate if account IDs are 12 digit input
  • We check if user provided any duplicate IDs and Aliases
  • A new button beside the existing Add Item button to add multiple roles in bulk

Changes in current behaviour:

  • While validating roles, we do not fail fast on first failure. We validate them all and display errors (if any)
  • If some roles are failed to validate, we list them all with respective error messages

Note

  • User can add roles in bulk and also add individual items at the same time. All of them are consolidated to roles[]
Screenshot 2026-08-25 at 5 14 45 PM Screenshot 2026-08-26 at 11 37 58 AM

Copilot AI lite review requested due to automatic review settings August 25, 2026 11:38
@linear

linear Bot commented Aug 25, 2026

Copy link
Copy Markdown

OPS-4753

OPS-4573

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a bulk-add UX for AWS connection role entries in the React UI (paste account IDs + shared role name/external ID) and updates AWS auth validation to aggregate and report all role assumption failures instead of stopping at the first error. This improves usability for large multi-account AWS connections while keeping the underlying roles[] model intact.

Changes:

  • React UI: introduce “Add multiple accounts” flow for AWS connection roles, plus supporting parsing utilities and translations.
  • React UI: add an ArrayBlockProperty footer slot (extraActions) and thread arrayExtraActions through the auto-properties form pipeline.
  • openops AWS auth: validate roles in batches but aggregate failures across all roles into a single multi-line error message.

Blocking

  • addArrayItemsToSchema currently truncates existing array item schemas (existingItems.slice(0, previousArrayLength)), which can silently drop schemas if the schema and previousArrayLength ever drift.

Non-blocking

  • PR ticket reference mismatch: PR body says OPS-4573, added spec document references OPS-4753.

Merge recommendation

  • Do not merge

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/react-ui/src/app/features/connections/lib/tests/aws-bulk-roles-utils.test.ts Unit tests for account ID parsing and ARN helpers.
packages/react-ui/src/app/features/connections/lib/aws-bulk-roles-utils.ts New parsing/building helpers for bulk AWS role generation.
packages/react-ui/src/app/features/connections/components/tests/create-edit-connection-dialog-content.test.tsx Tests that bulk trigger shows only for AWS and summary behavior works.
packages/react-ui/src/app/features/connections/components/tests/aws-bulk-roles-panel.test.tsx Panel-level behavior tests (counts, disable rules, append behavior, RHF regression coverage).
packages/react-ui/src/app/features/connections/components/custom-auth-connection-settings.tsx Forwards arrayExtraActions down to the auto-properties form.
packages/react-ui/src/app/features/connections/components/create-edit-connection-dialog-content.tsx Wires AWS-only bulk UI into roles array footer and adjusts validation banner for large role counts.
packages/react-ui/src/app/features/connections/components/aws-bulk-roles.tsx AWS-specific footer action: trigger button, panel toggling, and post-add summary + scroll behavior.
packages/react-ui/src/app/features/connections/components/aws-bulk-roles-panel.tsx Bulk panel UI and logic to append roles via setValue + schema growth.
packages/react-ui/src/app/features/builder/dynamic-form-validation/tests/dynamic-form-validation-context.test.tsx Tests for new batched addArrayItemsToSchema behavior.
packages/react-ui/src/app/features/builder/dynamic-form-validation/dynamic-form-validation-context.tsx Adds addArrayItemsToSchema to batch-grow tuple schemas for arrays.
packages/react-ui/src/app/features/builder/block-properties/tests/array-property.test.tsx Tests new array footer slot rendering.
packages/react-ui/src/app/features/builder/block-properties/auto-properties-form.tsx Threads arrayExtraActions to array properties.
packages/react-ui/src/app/features/builder/block-properties/array-property.tsx Adds extraActions slot next to “Add Item” in array footer.
packages/react-ui/public/locales/en/translation.json Adds new i18n keys for bulk-add UI and updated AWS validation banner text.
packages/openops/test/aws/auth.test.ts Updates/extends tests for aggregated multi-role validation error formatting.
packages/openops/src/lib/aws/auth.ts Aggregates all role assumption failures across batches into one formatted error message.
OPS-4753-bulk-aws-accounts-spec.md Adds an MVP spec document describing the UX and implementation decisions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sonarqubecloud

Copy link
Copy Markdown

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