You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect a human-readable error message, something like this:
Error validating spec for Test type=exec name=foo:
...
25 | type: exec
26 | name: foo
------------^
Expected an array at 'spec.command', actually received 'undefined'.
Reproducible example
Command: garden test
# garden.yml
apiVersion: garden.io/v1
kind: Project
name: foo
environments:
- name: local
---
kind: Test
type: exec
name: foo
Workaround
Suggested solution(s)
Additional context
Your environment
OS: macOS
garden version 0.13.20
The text was updated successfully, but these errors were encountered:
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first pull request, please read our contributor
guidelines in the
https://github.com/garden-io/garden/blob/main/CONTRIBUTING.md file.
2. Please label this pull request according to what type of issue you
are addressing (see "What type of PR is this?" below)
3. Ensure you have added or run the appropriate tests for your PR.
4. If the PR is unfinished, add `WIP:` at the beginning of the title or
use the GitHub Draft PR feature.
5. Please add at least two reviewers to the PR. Currently active
maintainers are: @edvald, @thsig, @eysi09, @shumailxyz, @stefreak,
@TimBeyer, @mkhq, and @vvagaytsev.
-->
**What this PR does / why we need it**:
Before this fix, we were simply passing through the default error
messages generated by Zod when validation failed. This resulted in
JSON-like error messages when a Zod schema validation error happened.
This was fixed by detecting Joi VS Zod validation errors, and adding a
little rendering logic for Zod errors to improve the output.
**Which issue(s) this PR fixes**:
Fixes#5446.
**Special notes for your reviewer**:
Before this fix, introducing an `exec` Test with a missing
`spec.command` would result in an error message like this:
![Screenshot 2024-02-19 at 12 06
18](https://github.com/garden-io/garden/assets/382137/ad038cdd-b624-42fe-a7e8-a66951bb5c9b)
After this fix:
![Screenshot 2024-02-19 at 12 05
33](https://github.com/garden-io/garden/assets/382137/41a5527b-70c9-4e4a-bb4f-04930bc5087b)
---------
Co-authored-by: Vladimir Vagaytsev <vladimir.vagaitsev@gmail.com>
Garden Bonsai (0.13) Bug
Current Behavior
When the
spec.command
field is not defined in anexec
Test
action, I currently get the following error message:Expected behavior
I expect a human-readable error message, something like this:
Reproducible example
Command:
garden test
Workaround
Suggested solution(s)
Additional context
Your environment
garden version
0.13.20The text was updated successfully, but these errors were encountered: