Skip to content

dresources: remove permissions/grants special-casing from plan and migrate - #6302

Merged
denik merged 2 commits into
mainfrom
denik/investigate-use-of-resource-key
Aug 18, 2026
Merged

dresources: remove permissions/grants special-casing from plan and migrate#6302
denik merged 2 commits into
mainfrom
denik/investigate-use-of-resource-key

Conversation

@denik

@denik denik commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

makePlan and BuildStateFromTF each dispatched on strings.HasSuffix(node, ".permissions") / ".grants", plus a resources.secret_scopes. prefix check that repeated a dispatch SupportedResources already does. Two optional adapter hooks replace both branches with a single PrepareInputConfig call:

  • Configure(resourceType) runs once per registered type at adapter construction. Permissions and grants resolve their object type prefix and securable type there instead of re-parsing the node on every plan, so a type registered in all.go without a matching prefix entry now fails in InitAll instead of at plan time.
  • PrepareInputConfig(inputConfig, resourceKey) returns the value passed to PrepareState together with the object_id / full_name reference, replacing the three exported Prepare*InputConfig functions.

Tests

Unit tests pin the object_id reference format (the default id field and the models -> model_id override), which was only covered end-to-end before.

…grate

Two optional adapter hooks, Configure(resourceType) and
PrepareInputConfig(inputConfig, resourceKey), replace the suffix/prefix
dispatch that makePlan and BuildStateFromTF each carried.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 153a6a6

Run: 32128664792

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 3 1 4 286 1150 8:02
🟨​ aws windows 2 1 1 4 288 1148 7:06
🟨​ azure linux 3 1 4 285 1150 9:04
🟨​ azure windows 2 1 1 4 287 1148 6:49
💚​ gcp linux 1 5 286 1150 7:30
💚​ gcp windows 1 5 288 1148 5:32
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 🟨​K 🟨​K 🟨​K 🟨​K 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 🟨​K 🟨​K 🟨​K 🔄​f
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 🟨​K 🔄​f 🟨​K 🟨​K
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:37 aws windows TestAccept
5:33 azure windows TestAccept
5:24 gcp windows TestAccept
3:52 gcp linux TestAccept
3:50 azure linux TestAccept
3:46 aws linux TestAccept

@denik
denik added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 26bce90 Aug 18, 2026
25 checks passed
@denik
denik deleted the denik/investigate-use-of-resource-key branch August 18, 2026 15:40
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