-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvement(core): fix missing action type err msg #6176
Conversation
Before this fix, we'd erroneously list the available action kinds instead of the available action types (for the invalid action's kind). Fixes #5401.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! ❤️
I do have two comments, but not a strictly required to fix before merging this.
|
||
const configPath = relative(garden.projectRoot, config.internal.configFilePath || config.internal.basePath) | ||
|
||
if (!actionTypes[config.kind][config.type]) { | ||
if (!actionTypes[kind][type]) { | ||
const availableKinds: ActionKind[] = [] | ||
actionKinds.forEach((actionKind) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd find k
as variable name slightly less confusion here, as it would be easier to distinguish from the new kind
variable name in the top level
contains: [ | ||
"Unrecognized action type 'invalidtype'", | ||
"Currently available 'Build' action types: 'container', 'exec', 'test'", | ||
"Are you missing a provider configuration?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not a good page in the docs that introduces the concept of providers. The closest would probably be https://docs.garden.io/reference/project-config … should we still help the user a little bit here and ask them to have a look at the docs?
Can we find the provider names that provide the referenced action type and list them as well?
What this PR does / why we need it:
Before this fix, we'd erroneously list the available action kinds instead of the available action types (for the invalid action's kind).
Which issue(s) this PR fixes:
Fixes #5401.