Commit Graph

4 Commits

Author SHA1 Message Date
Denis Bilenko 16d412aa67 Keep libs/dyn unchanged; annotate with //nolint:errcheck 2024-12-11 09:55:28 +01:00
Denis Bilenko cc7a46d545 keep ignoring errors that were ignored before 2024-12-11 09:55:28 +01:00
Denis Bilenko b63be2d6f5 all 2024-12-11 09:55:28 +01:00
Andrew Nester f0e2981596
Added JSON input validation for CLI commands (#1771)
## Changes
Added JSON input validation for CLI commands. Now when invalid JSON
passed as a payload to CLI commands, CLI performs input normalisation
and detects if there are any mismatches such as incorrect types, unknown
fields and etc.

This diagnostic information is printed in standard error output and does
not block command execution, so the change is backward compatible.

Fixes #1769 #1764 #1625 #1560


## Tests
Added unit tests

```
andrew.nester@HFW9Y94129 ~ % databricks jobs create --json '{"seeti}'
Error: error decoding JSON at (inline):1:2: unexpected EOF


andrew.nester@HFW9Y94129 ~ % databricks jobs create --json '{"seeti": true}'
Warning: unknown field: seeti
  in (inline):1:9

Error: Job settings must be specified.
```

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2024-10-11 14:39:53 +00:00