Skip to content

Commit 6c00c17

Browse files
Trigger target change on prevalidate changes, so that auth resolution happens again (#1055)
## Changes Auth resolution does not happen again when pre validate configs change (host, mode etc). We want to treat changes to prevalidate config as target changes, so that complete auth resolution happens again. ## Tests <!-- How is this tested? -->
1 parent 5da4b76 commit 6c00c17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/databricks-vscode/src/configuration/models/ConfigModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ export class ConfigModel implements Disposable {
131131
}),
132132
this.bundlePreValidateModel.onDidChange(async () => {
133133
await this.readTarget();
134+
// We fire the target change emitter because auth info might have changed,
135+
// which we handle exactly the same way as a target change.
136+
this.onDidChangeTargetEmitter.fire();
134137
//refresh cache to trigger onDidChange event
135138
await this.configCache.refresh();
136139
}),

0 commit comments

Comments
 (0)