databricks / cli

Databricks CLI
Other
115 stars 39 forks source link

PythonMutator: add diagnostics #1531

Open kanterov opened 5 days ago

kanterov commented 5 days ago

Changes

Allow PyDABs to report dyn.Diagnostics by writing to diagnostics.json supplied as an argument, similar to input.json and output.json

Such errors are not yet properly printed in databricks bundle validate, which will be fixed in a follow-up PR.

Tests

Unit tests

codecov-commenter commented 5 days ago

Codecov Report

Attention: Patch coverage is 68.46154% with 41 lines in your changes missing coverage. Please review.

Project coverage is 54.01%. Comparing base (e22dd8a) to head (ca3bdfd). Report is 168 commits behind head on main.

Files Patch % Lines
bundle/config/mutator/python/python_diagnostics.go 71.23% 15 Missing and 6 partials :warning:
bundle/config/mutator/python/python_mutator.go 64.91% 14 Missing and 6 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1531 +/- ## ========================================== + Coverage 52.25% 54.01% +1.76% ========================================== Files 317 354 +37 Lines 18004 20764 +2760 ========================================== + Hits 9408 11216 +1808 - Misses 7903 8730 +827 - Partials 693 818 +125 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kanterov commented 4 days ago

@pietern I've addressed your comments. Please take a look again.

kanterov commented 7 hours ago

@shreyas-goenka @pietern addressed your comments, please take a look.

The remaining question is the CLI version check. I don't find it pressing if we put effort into templates and documentation. I think in the long run, we should serialize the current CLI version as a part of the JSON we pass. What do you think?