Skip to content

Pass the per-datasource external ID through to Assume Role - #766

Merged
iwysiu merged 9 commits into
mainfrom
isiu/wire-assume-role-external-id
Nov 24, 2026
Merged

iwysiu merged 9 commits into
mainfrom
isiu/wire-assume-role-external-id

Conversation

@iwysiu

@iwysiu iwysiu commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Type of Change

  • 🚀 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧹 Refactor / Chore

Feature

What is this feature?

Grafana Assume Role on Timestream uses the server-minted per-datasource external ID, and that ID stays on the form after save. NewDatasource copies GrafanaExternalID and UsePerDatasourceExternalID into awsauth.Settings. saveOptions merges the save response, including jsonData, instead of keeping only version.

Based on grafana/athena-datasource#880 and grafana/grafana-cloudwatch-datasource#582 for the field copy, and grafana/athena-datasource#895 for the save merge.

Why is this feature needed?

Timestream built awsauth.Settings with ExternalID only, so a newer SDK never saw the minted ID. The custom save handler also kept only version, so the minted ID disappeared from the form until reload. @grafana/aws-sdk was 0.12.1.

Who is this feature for?

Operators who use Grafana Assume Role and want each Timestream datasource to present its own external ID.

How to test this feature

  1. Configure Grafana Assume Role on a Timestream datasource and save it.
  2. Confirm the minted external ID is still shown and still stored, without reloading.
  3. Run a query and confirm Assume Role is called with that external ID.

TestNewDatasource_passesGrafanaExternalIDFields and the config editor save test cover this.

Leaves #729 open. That draft fixes the save merge and not the Go copy.

Please check that:

  • Tests for this change have been added/updated.
  • Documentation has been added/updated (where applicable).

Special notes for your reviewer

@grafana/aws-sdk is 0.12.2. The Go SDK is already v1.5.7.

@iwysiu
iwysiu marked this pull request as ready for review November 13, 2026 18:26
@iwysiu
iwysiu requested a review from a team as a code owner November 13, 2026 18:26
@iwysiu iwysiu added the type/feature-request New feature or request label Nov 13, 2026

@adamyeats adamyeats 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.

@iwysiu Please ensure an E2E spec covers the changed surface. tests/configEditor.spec.ts already covers the config editor, so a check there that the minted external ID still shows after save would cover it. Happy to review once that's done!

@adamyeats adamyeats self-assigned this Nov 16, 2026
Copy GrafanaExternalID and UsePerDatasourceExternalID into awsauth.Settings and merge the save response so the minted ID stays in the form.
@iwysiu
iwysiu force-pushed the isiu/wire-assume-role-external-id branch from c3e0c41 to 90f4e44 Compare November 18, 2026 16:55
@iwysiu
iwysiu requested a review from adamyeats November 18, 2026 21:04
Comment thread src/components/ConfigEditor.tsx Resolved
@iwysiu
iwysiu requested a review from adamyeats November 19, 2026 16:34
Comment thread tests/configEditor.spec.ts Resolved
Comment thread tests/configEditor.spec.ts Resolved
Comment thread src/components/ConfigEditor.test.tsx Resolved
Comment thread CHANGELOG.md Resolved

@iwysiu iwysiu left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added requested tests! And updated it to bump the release

Comment thread src/components/ConfigEditor.test.tsx Resolved
Comment thread tests/configEditor.spec.ts Resolved
Comment thread tests/configEditor.spec.ts Resolved
Comment thread CHANGELOG.md Resolved
@iwysiu
iwysiu requested a review from dgiagio November 24, 2026 21:29
@iwysiu
iwysiu dismissed adamyeats’s stale review November 24, 2026 21:34

trying to get this in before code freeze, it was checked and approved by a different team member

@iwysiu
iwysiu merged commit 1241934 into main Nov 24, 2026
26 checks passed
@iwysiu
iwysiu deleted the isiu/wire-assume-role-external-id branch November 24, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature-request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants