Skip to content

Commit

Permalink
Log validate and summary errors to the output channel (#1492)
Browse files Browse the repository at this point in the history
## Changes
Log validate and summary errors to the output channel. Currently we
print generic error line, but no specifics

## Tests
<!-- How is this tested? -->
  • Loading branch information
ilia-db authored Dec 24, 2024
1 parent 887771e commit 60215b6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/databricks-vscode/src/cli/CliWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,9 @@ export class CliWrapper {
configfilePath?: string,
logger?: logging.NamedLogger
) {
const bundleOpName = "validate";
return await runBundleCommand(
"validate",
bundleOpName,
this.cliPath,
["bundle", "validate", "--target", target],
workspaceFolder,
Expand All @@ -509,10 +510,9 @@ export class CliWrapper {
},
await this.getBundleCommandEnvVars(authProvider, configfilePath),
logger,
{
onStdOut: (data) => logger?.debug(data, {target}),
onStdError: (data) => logger?.debug(data, {target}),
}
// Print stdout to the debug log (not visible in the output channel).
// stderr data will be printed to the output channel with the error level.
{onStdOut: (data) => logger?.debug(data, {target, bundleOpName})}
);
}

Expand All @@ -523,8 +523,9 @@ export class CliWrapper {
configfilePath?: string,
logger?: logging.NamedLogger
) {
const bundleOpName = "summarize";
return await runBundleCommand(
"summarize",
bundleOpName,
this.cliPath,
[
"bundle",
Expand All @@ -544,10 +545,9 @@ export class CliWrapper {
},
await this.getBundleCommandEnvVars(authProvider, configfilePath),
logger,
{
onStdOut: (data) => logger?.debug(data, {target}),
onStdError: (data) => logger?.debug(data, {target}),
}
// Print stdout to the debug log (not visible in the output channel).
// stderr data will be printed to the output channel with the error level.
{onStdOut: (data) => logger?.debug(data, {target, bundleOpName})}
);
}

Expand Down

0 comments on commit 60215b6

Please sign in to comment.