cpl doctor command, including validation for duplicate app matching when prefix #150
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.
Add controlplane.yml verification, first check is invalid prefixes that collide with other apps or prefixes
There's currently a bug where if there's an app defined after another app (both with
match_if_app_name_starts_with
set totrue
), and the name of the second app is a prefix in the name of the first app, and we try to run commands for apps with a name matching the first app, the second app will be used instead.For example, let's say that we have this in
.controlplane/controlplane.yml
:If we call a command like
cpl deploy-image -a app-test-other-123
, it will use the config fromapp-test
instead of the one fromapp-test-other
.This PR fixes that by immediately returning an exit code of 1 from any cpl command.
Maybe add a
cpl doctor
command, likebrew doctor
, giving helpful tips and verifying configuration.