Skip to content

Commit d3fb173

Browse files
Update Databricks CLI to v0.218.1 (#1208)
## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? --> --------- Co-authored-by: eng-dev-ecosystem-bot <[email protected]> Co-authored-by: eng-dev-ecosystem-bot <[email protected]>
1 parent a342738 commit d3fb173

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

packages/databricks-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@
870870
"useYarn": false
871871
},
872872
"cli": {
873-
"version": "0.218.0"
873+
"version": "0.218.1"
874874
},
875875
"scripts": {
876876
"vscode:prepublish": "rm -rf out && yarn run package:compile && yarn run package:wrappers:write && yarn run package:jupyter-init-script:write && yarn run package:copy-webview-toolkit && yarn run generate-telemetry",

packages/databricks-vscode/src/cli/CliWrapper.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {LoggerManager} from "../logger";
2121
import {ProfileAuthProvider} from "../configuration/auth/AuthProvider";
2222
import {isMatch} from "lodash";
2323
import {removeUndefinedKeys} from "../utils/envVarGenerators";
24+
import {writeFileSync} from "fs";
2425

2526
const execFile = promisify(execFileCb);
2627
const cliPath = path.join(__dirname, "../../bin/databricks");
@@ -112,22 +113,22 @@ describe(__filename, () => {
112113
assert.equal(profiles.length, 0);
113114
});
114115

115-
// TODO: Don't skip this after cli is updated to > 0.218.0
116-
it.skip("should list profiles", async function () {
116+
it("should list profiles", async () => {
117117
const logFilePath = getTempLogFilePath();
118118
const cli = createCliWrapper(logFilePath);
119119

120120
await withFile(async ({path}) => {
121-
await writeFile(
121+
writeFileSync(
122122
path,
123123
`
124-
host = https://cloud.databricks.com/
125-
token = dapitest1234
124+
host = https://cloud.databricks.com/
125+
token = dapitest1234
126126
127-
[STAGING]
128-
host = https://staging.cloud.databricks.com/
129-
token = dapitest54321
130-
`
127+
[STAGING]
128+
host = https://staging.cloud.databricks.com/
129+
token = dapitest54321
130+
`,
131+
"utf-8"
131132
);
132133

133134
const profiles = await cli.listProfiles(path);
@@ -144,13 +145,12 @@ describe(__filename, () => {
144145
});
145146
});
146147

147-
// TODO: Don't skip this after cli is updated to > 0.218.0
148-
it.skip("should load all valid profiles and return errors for rest", async () => {
148+
it("should load all valid profiles", async () => {
149149
const logFilePath = getTempLogFilePath();
150150
const cli = createCliWrapper(logFilePath);
151151

152152
await withFile(async ({path}) => {
153-
await writeFile(
153+
writeFileSync(
154154
path,
155155
`[correct]
156156
host = https://cloud.databricks.com/
@@ -164,9 +164,10 @@ host = https://cloud.databricks.com/
164164
165165
[missing-host-token]
166166
nothing = true
167-
168-
`
167+
`,
168+
"utf-8"
169169
);
170+
170171
const profiles = await cli.listProfiles(path);
171172
assert.equal(profiles.length, 2);
172173

@@ -175,7 +176,6 @@ nothing = true
175176

176177
assert.equal(profiles[1].name, "no-token");
177178
assert.equal(profiles[1].host, "https://cloud.databricks.com/");
178-
assert.equal(profiles[1].authType, "");
179179
});
180180
});
181181

0 commit comments

Comments
 (0)