Skip to content

Refuse to build configset if domain has no recipe config entry#76

Draft
troglodyne-bot wants to merge 1 commit into
masterfrom
koan/implement-75
Draft

Refuse to build configset if domain has no recipe config entry#76
troglodyne-bot wants to merge 1 commit into
masterfrom
koan/implement-75

Conversation

@troglodyne-bot

Copy link
Copy Markdown
Contributor

Summary

When bin/new_config somedomain is invoked and there is no top-level somedomain key in the merged recipe configuration, the tool previously fell back silently to building from _base globals alone — or died with the confusing message "Must provide data configuration". This made misnamed YAML files in recipes.d/ hard to diagnose.

Closes #75

Changes

  • Added an early die in handle_domain (after stripping _base/_shared) that names the missing domain and tells the operator exactly what to add to their recipes configuration
  • Added t/new_config_domain_validation.t — a regression test that verifies the error fires with the domain name in the message
  • Added t/lib/Net/SFTP/Foreign.pm stub so the test can load bin/new_config without requiring the SSH module at compile time

Test plan

  • Test was written first and confirmed to FAIL before the fix (with the old "Must provide data configuration" message)
  • Test passes after the fix with the new actionable error message
  • Run: PERL5LIB=/tmp/cpanlib/lib/perl5 make test

Generated by Kōan

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>
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.

Refuse to build a domain's configset if it does not have a specific entry in the recipe configuration

1 participant