Skip to content

List run_as-unsupported resource types in one place - #7352

Draft
janniklasrose wants to merge 1 commit into
mainfrom
janniklasrose/run-as-unsupported-list
Draft

janniklasrose wants to merge 1 commit into
mainfrom
janniklasrose/run-as-unsupported-list

Conversation

@janniklasrose

Copy link
Copy Markdown
Member

Changes

validateRunAs had one hand-written block per resource type whose API does not support deploying as a different principal. They are replaced by a single list of unsupported resource groups, iterated in AllResources() order so the diagnostics keep their order and locations. Dashboards keep their per-resource check, since only those with embed_credentials set are rejected.

A new test asserts that every supported resource type appears in exactly one of the test's allow list or the unsupported list, and that every listed name is a real resource type. Adding a resource type now fails until a run_as decision is made explicitly.

Why

Opting a new resource type into or out of run_as support was a copy-paste block that nothing checked for completeness. A type wrongly placed on the allow list was caught by nothing.

Tests

  • go test ./bundle/config/mutator/resourcemutator -run 'TestRunAs' -count=1, including the new TestRunAsSupportListsAreComplete.
  • go test ./bundle/config/... -count=1.
  • Acceptance tests under acceptance/bundle/run_as and acceptance/bundle/run pass without regenerating goldens, so diagnostics are unchanged.

This pull request and its description were written by Isaac.

Replace the hand-written block per resource type in validateRunAs with a
single list of unsupported resource groups. Iterating AllResources keeps
the diagnostics in the same order and at the same locations as before.
Dashboards stay a per-resource check because only those with
embed_credentials set are rejected.

Add a test that every supported resource type is classified exactly once
in allowList or the unsupported list, so a new type forces a decision.

Co-authored-by: Isaac <no-reply@databricks.com>
@janniklasrose janniklasrose added the new-resource-work Skills, docs and small refactors for onboarding new bundle resources label Nov 4, 2026
@github-actions github-actions Bot added the DABs DABs related issues label Nov 4, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 331de0b

Run: 41860715766

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 15 6:05
✅​ aws-windows-latest-4core-16gb 273 13 7:12
✅​ azure linux-2core-8gb 270 15 6:54
✅​ azure-windows-latest-4core-16gb 272 13 6:41
✅​ gcp linux-2core-8gb 271 15 6:56
✅​ gcp-windows-latest-4core-16gb 273 13 6:10
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:34 gcp-windows-latest-4core-16gb TestAccept
3:20 aws-windows-latest-4core-16gb TestAccept
3:12 azure-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues new-resource-work Skills, docs and small refactors for onboarding new bundle resources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants