direct: add test for redundant resources.yml lifecycle entries#5267
Merged
Conversation
Adds a unit test that fails when `bundle/direct/dresources/resources.yml` has redundant lifecycle rules: a field listed twice in the same category of a resource, or a hand-written field that `resources.generated.yml` already produces. The hand-written and generated configs are merged at runtime by consulting both in series (`bundle/direct/bundle_plan.go`), so duplicates were silently tolerated. Also removes one existing class-A bug the test surfaced: a duplicated block of `gateway_definition.*` and `ingestion_definition.ingest_from_uc_foreign_catalog` entries under `pipelines.recreate_on_changes`. Co-authored-by: Isaac
andrewnester
approved these changes
May 19, 2026
Contributor
|
Possible follow up: add 'bool override' to FieldRule that allows intentional duplicate (we can check that value is different too). No specific use case though. |
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.
Adds a unit test that fails when
bundle/direct/dresources/resources.ymlhas redundant lifecycle rules: a field listed twice in the same category of a resource, or a hand-written field thatresources.generated.ymlalready produces. The hand-written and generated configs are merged at runtime by consulting both in series (bundle/direct/bundle_plan.go), so duplicates were silently tolerated.Also removes one existing bug the test surfaced: a duplicated block of
gateway_definition.*andingestion_definition.ingest_from_uc_foreign_catalogentries underpipelines.recreate_on_changes.This pull request and its description were written by Isaac.