[Resolves #1268] Modify ConfigFileNotFound Error to Conditionally Include Valid Stack Paths
Modifies the Sceptre Plan ConfigFileNotFound error to only include the list of valid stack paths from the command path specified and only there are less than 10 stacks.
Example
sceptre launch dev/service1/foo.yaml
New Error Message (when there are less than 10 stacks under the specified parent path)
"No stacks detected from the given path 'dev/service1/foo.yaml'. Valid stack paths under 'dev/service1' are: ['dev/service1/foo1.yaml', 'dev/service1/foo2.yaml', 'dev/service1/subservice1/foo3.yaml']"
New Error Message (when there are 10 stacks or more under the specified parent path)
"No stacks detected from the given path 'dev/service1/foo.yaml'."
- Resolves #1268
PR Checklist
- [ ] Wrote a good commit message & description [see guide below].
- [ ] Commit message starts with
[Resolve #issue-number]. - [ ] Added/Updated unit tests.
- [ ] Added/Updated integration tests (if applicable).
- [ ] All unit tests (
make test) are passing. - [ ] Used the same coding conventions as the rest of the project.
- [ ] The new code passes pre-commit validations (
pre-commit run --all-files). - [ ] The PR relates to only one subject with a clear title. and description in grammatically correct, complete sentences.
Approver/Reviewer Checklist
- [ ] Before merge squash related commits.
Other Information
@X-Guardian, what are the status on the tests for this PR?
@X-Guardian Do you have any plans to finish this PR?
From what I remember it works, but I don't use Sceptre any more, so won't be writing any tests, which is what I think was blocking this getting merged.
@zaro0508 I have had a look at this stale PR and I agree with @X-Guardian and I think the PR should be merged as-is. The new private method is simply tweaking the error message seen and I do not think that such a trivial change justifies us adding more unit test code. Nor is it obvious to me how you would test this anyway.
Could we merge? I've added it into my integration branch and I'm certainly happy with it.