-
Notifications
You must be signed in to change notification settings - Fork 72
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
Print diagnostics in 'bundle deploy' #1579
Conversation
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.
This is a good step, but only half of a solution.
The validate
command doesn't have side effects, so you can naturally decide whether to address the warnings or run with them. This is not the case for deploy,
where we'll continue and do the actual deployment regardless of warnings.
Let's pair this with other changes that:
- Make it possible to treat warnings as errors
- Can stream warnings as they happen as opposed to delaying them until the end of execution
@pietern I agree with your points. Do you think this is something we can do as a follow-up? With this change, we don't change the existing execution flow, and the points you mentioned are already true. However, it addresses the problem of users not being aware of warnings at all and adds pretty-printing of errors/warnings, which is useful when they have source location and additional details. |
I triggered nightlies on this change to confirm they fail for the lack of exit status. If they don't we'll need to address that as well. |
@pietern updated PR description with more examples, there is 1 extra trailing new line, which would be hard to get rid of due to how we use go template, unless we do extra buffering |
We can revisit the exact output and make those newlines disappear later. |
Bundles: * Override complex variables with target overrides instead of merging ([#1567](#1567)). * Rewrite local path for libraries in foreach tasks ([#1569](#1569)). * Change SetVariables mutator to mutate dynamic configuration instead ([#1573](#1573)). * Return early in bundle destroy if no deployment exists ([#1581](#1581)). * Let notebook detection code use underlying metadata if available ([#1574](#1574)). * Remove schema override for variable default value ([#1536](#1536)). * Print diagnostics in 'bundle deploy' ([#1579](#1579)). Internal: * Update actions/upload-artifact to v4 ([#1559](#1559)). * Use Go 1.22 to build and test ([#1562](#1562)). * Move bespoke status call to main workspace files filer ([#1570](#1570)). * Add new template ([#1578](#1578)). * Add regression tests for CLI error output ([#1566](#1566)). Dependency updates: * Bump golang.org/x/mod from 0.18.0 to 0.19.0 ([#1576](#1576)). * Bump golang.org/x/term from 0.21.0 to 0.22.0 ([#1577](#1577)).
Bundles: * Override complex variables with target overrides instead of merging ([#1567](#1567)). * Rewrite local path for libraries in foreach tasks ([#1569](#1569)). * Change SetVariables mutator to mutate dynamic configuration instead ([#1573](#1573)). * Return early in bundle destroy if no deployment exists ([#1581](#1581)). * Let notebook detection code use underlying metadata if available ([#1574](#1574)). * Remove schema override for variable default value ([#1536](#1536)). * Print diagnostics in 'bundle deploy' ([#1579](#1579)). Internal: * Update actions/upload-artifact to v4 ([#1559](#1559)). * Use Go 1.22 to build and test ([#1562](#1562)). * Move bespoke status call to main workspace files filer ([#1570](#1570)). * Add new template ([#1578](#1578)). * Add regression tests for CLI error output ([#1566](#1566)). Dependency updates: * Bump golang.org/x/mod from 0.18.0 to 0.19.0 ([#1576](#1576)). * Bump golang.org/x/term from 0.21.0 to 0.22.0 ([#1577](#1577)).
Changes
Print diagnostics in 'bundle deploy' similar to 'bundle validate'. This way if a bundle has any errors or warnings, they are going to be easy to notice.
NB: due to how we render errors, there is one extra trailing new line in output, preserved in examples below
Example: No errors or warnings
Example: Error on load
Example: Warning on load
Example: Error + warning on load
Example: Warning on load + error in init
Tests
Tested manually