internal: split resources.yml into one file per resource - #6334
Open
denik wants to merge 3 commits into
Open
Conversation
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.
andrewnester
approved these changes
Aug 20, 2026
denik
force-pushed
the
denik/split-resources-yml
branch
from
August 20, 2026 10:57
832ad6e to
29e146d
Compare
Collaborator
Integration test reportCommit: 29e146d
Top 7 slowest tests (at least 2 minutes):
|
pietern
reviewed
Aug 20, 2026
| @@ -1 +1,2 @@ | |||
| *.generated.yml linguist-generated=true | |||
| *.generated.yaml linguist-generated=true | |||
Contributor
There was a problem hiding this comment.
The .yml vs .yaml nuance is lost on me. Can we move these per-type configs into a subdir?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.