Repository navigation
Fail the invariant coverage test when a config template is not in the matrix - #7353
Draft
janniklasrose wants to merge 1 commit into
Draft
janniklasrose wants to merge 1 commit into
janniklasrose wants to merge 1 commit into
Conversation
… matrix A config template under bundle/invariant/configs that is missing from INPUT_CONFIG never runs, and nothing flagged it. The new test requires every template to be listed or explicitly allowlisted, and every INPUT_CONFIG entry to name an existing file. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: c349605
Top 3 slowest tests (at least 2 minutes):
|
This branch has not been deployed
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
Adds
TestInvariantConfigsListednext toTestInvariantConfigsCoverageinacceptance/invariant_test.go. It readsacceptance/bundle/invariant/test.tomlthrough the acceptance config loader and asserts that every*.yml.tmplunderacceptance/bundle/invariant/configs/is listed inEnvMatrix.INPUT_CONFIG, unless it is named in an explicit allowlist, and that every matrix entry names an existing template.The allowlist records the templates that exist on main today without a matrix entry. It may only shrink: to run one of them, add it to the matrix and remove it from the list. No matrix entries or goldens change in this PR.
Why
A template that is not in the matrix never runs, and the existing coverage test only checks that a file exists per resource type. Several templates were in that state without anything flagging it.
Tests
go test ./acceptance -run 'TestInvariant' -count=1: both tests pass.This pull request and its description were written by Isaac.