Refuse to build configset if domain has no recipe config entry#76
Draft
troglodyne-bot wants to merge 1 commit into
Draft
Refuse to build configset if domain has no recipe config entry#76troglodyne-bot wants to merge 1 commit into
troglodyne-bot wants to merge 1 commit into
Conversation
When `bin/new_config` is invoked for a domain that has no top-level key in the merged recipe configuration, it previously fell back silently to building from `_base` globals alone — or died with a confusing "Must provide data configuration" message. This made it hard to diagnose misnamed yaml files in recipes.d/. Now we die immediately after stripping `_base`/`_shared` with a clear, actionable message that names the missing domain, so operators know exactly what to add to recipes.yaml or recipes.d/. Closes #75 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
When
bin/new_config somedomainis invoked and there is no top-levelsomedomainkey in the merged recipe configuration, the tool previously fell back silently to building from_baseglobals alone — or died with the confusing message "Must provide data configuration". This made misnamed YAML files inrecipes.d/hard to diagnose.Closes #75
Changes
dieinhandle_domain(after stripping_base/_shared) that names the missing domain and tells the operator exactly what to add to their recipes configurationt/new_config_domain_validation.t— a regression test that verifies the error fires with the domain name in the messaget/lib/Net/SFTP/Foreign.pmstub so the test can loadbin/new_configwithout requiring the SSH module at compile timeTest plan
PERL5LIB=/tmp/cpanlib/lib/perl5 make testGenerated by Kōan