Skip to content

Build bundle/config.ResourcesTypes on first use - #7445

Merged
pietern merged 1 commit into
init-time-airfrom
init-time-resources-types
Nov 11, 2026
Merged

pietern merged 1 commit into
init-time-airfrom
init-time-resources-types

Conversation

@pietern

@pietern pietern commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

ResourcesTypes is now a sync.OnceValue instead of a map built at init. Building it walks every resource type with reflection, which took 0.36 ms on every invocation.

Tests: existing tests run the initializer.

This pull request and its description were written by Isaac.

ResourcesTypes walked every resource type with reflection at package
init, on every CLI invocation. Make it a sync.OnceValue; its only
non-test caller is Root.GetResourceConfig.

Co-authored-by: Isaac <no-reply@databricks.com>
@pietern
pietern added this pull request to stack #7449 November 10, 2026 15:46
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 0217742

Run: 42848064275

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 15 6:48
✅​ aws-windows-latest-4core-16gb 273 13 4:31
✅​ azure linux-2core-8gb 270 15 6:35
✅​ azure-windows-latest-4core-16gb 272 13 5:04
✅​ gcp linux-2core-8gb 271 15 7:19
✅​ gcp-windows-latest-4core-16gb 273 13 5:14
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:05 gcp-windows-latest-4core-16gb TestAccept
3:04 aws-windows-latest-4core-16gb TestAccept
2:59 azure-windows-latest-4core-16gb TestAccept

@pietern
pietern marked this pull request as ready for review November 11, 2026 07:50
@pietern
pietern requested review from a team as code owners November 11, 2026 07:50
@pietern
pietern added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit fa6c302 Nov 11, 2026
25 checks passed
@pietern
pietern deleted the init-time-resources-types branch November 11, 2026 10:21
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