Skip to content

internal: split resources.yml into one file per resource - #6334

Open
denik wants to merge 3 commits into
mainfrom
denik/split-resources-yml
Open

internal: split resources.yml into one file per resource#6334
denik wants to merge 3 commits into
mainfrom
denik/split-resources-yml

Conversation

@denik

@denik denik commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Changes

resources.yml and resources.generated.yml become one file per resource type — jobs.yaml, jobs.generated.yaml — omitted when the resource has no rules. The type comes from the file name, so each file holds its rules directly with no enclosing keys. The rules themselves are unchanged.

The files use .yaml so that //go:embed *.yaml matches exactly these, and not the generator inputs apitypes.yml and apitypes.generated.yml.

Tests

The parsed config compares equal to the old files for all 33 hand-written and 20 generated resources, and no acceptance output changed. New TestConfigFiles rejects a file named after something that is not a supported resource type, and a file with no rules.

@denik denik changed the title dresources: split resources.yml into one file per resource internal: split resources.yml into one file per resource Aug 20, 2026
denik added 2 commits August 20, 2026 12:43
resources.yml and resources.generated.yml become <resource_type>.yaml and
<resource_type>.generated.yaml, omitted when they have no rules. The resource
type comes from the file name, so each file holds the rules directly with no
enclosing keys.

The per-resource files use .yaml so that //go:embed *.yaml picks up exactly
these, and not the apitypes*.yml inputs of the generator.
Embed *.yaml and key each resource type by its file name, remove
resources.yml and resources.generated.yml, and make the generator write one
file per resource. Comments and test messages now name the file they mean.
@denik
denik force-pushed the denik/split-resources-yml branch from 832ad6e to 29e146d Compare August 20, 2026 10:57
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 29e146d

Run: 32361474682

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 1 4 274 1162 7:02
💚​ aws windows 1 4 276 1160 6:06
💚​ azure linux 1 4 273 1162 6:17
💚​ azure windows 1 4 275 1160 3:51
💚​ gcp linux 1 4 274 1162 7:13
💚​ gcp windows 1 4 276 1160 5:04
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
Top 7 slowest tests (at least 2 minutes):
duration env testname
3:47 azure linux TestAccept
3:44 gcp linux TestAccept
3:44 aws linux TestAccept
3:16 azure windows TestAccept
3:07 aws windows TestAccept
2:56 gcp windows TestAccept
2:23 aws windows TestFilerWorkspaceFilesExtensionsReadDir

@@ -1 +1,2 @@
*.generated.yml linguist-generated=true
*.generated.yaml linguist-generated=true

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.

The .yml vs .yaml nuance is lost on me. Can we move these per-type configs into a subdir?

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.

4 participants