Commit 5a85750
authored
Prompt users to setup virtual environment (#1169)
## Changes
This PR adds "Local Python Environment" UI element to our configuration
panel. It's only visible when we detect any unresolved problems:
- No cluster is connected (needed for the dbconnect setup)
- Workspace doesn't have Unity Catalog enabled (needed for the dbconnect
setup)
- Virtual environment is not enabled
- Databricks Connect is not installed
The problems are presented as an item in the "Python Environment" tree
node (last entry in the configuration view). Each item with "run" icon
is clickable and leads to relevant action to resolve the problem.
Majority or the actions we've already had for the "Databricks Connect"
button (bottom left corner, this PR doesn't change that). One change
here is that we force virtual environment activation before installing
dbconnect package. There are two items that are visible in the "success"
state: active environment and dbconnect version. Both of them have gear
icons that lead to actions to change the environment or reinstall
dbconnect (see screenshots below).
For now we don't have any additional logic for the newly created project
(through bundle init), when you create them and open in the VSCode, we
will also show the "Local Python Environment" UI that will prompt users
to enable the environment and install necessary dependencies into it.
For managing virtual environments themselves we use python extension
commands.
<img width="460" alt="Screenshot 2024-04-22 at 16 53 11"
src="https://github.com/databricks/databricks-vscode/assets/148094031/2be9026f-374b-40e0-83b0-14bde240fbcb">
<img width="460" alt="Screenshot 2024-04-22 at 16 52 22"
src="https://github.com/databricks/databricks-vscode/assets/148094031/3f0528b4-b0a7-4b81-86c4-f4e4e4a33a97">
<img width="460" alt="Screenshot 2024-04-22 at 16 52 04"
src="https://github.com/databricks/databricks-vscode/assets/148094031/4dcc1024-f451-415f-a1d0-a13e9073f8dc">1 parent b279467 commit 5a85750
File tree
23 files changed
+796
-733
lines changed- packages/databricks-vscode
- src
- configuration
- feature-manager
- file-managers
- language
- notebooks
- run
- ui/configuration-view
- vscode-objs
23 files changed
+796
-733
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
293 | 314 | | |
294 | 315 | | |
295 | 316 | | |
| |||
488 | 509 | | |
489 | 510 | | |
490 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
491 | 530 | | |
492 | 531 | | |
493 | 532 | | |
| |||
773 | 812 | | |
774 | 813 | | |
775 | 814 | | |
776 | | - | |
777 | 815 | | |
778 | 816 | | |
779 | 817 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
| 367 | + | |
| 368 | + | |
371 | 369 | | |
372 | 370 | | |
373 | | - | |
| 371 | + | |
374 | 372 | | |
375 | | - | |
| 373 | + | |
376 | 374 | | |
377 | 375 | | |
378 | | - | |
| 376 | + | |
379 | 377 | | |
380 | 378 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
390 | 407 | | |
391 | 408 | | |
392 | 409 | | |
| |||
406 | 423 | | |
407 | 424 | | |
408 | 425 | | |
409 | | - | |
410 | | - | |
| 426 | + | |
411 | 427 | | |
412 | 428 | | |
413 | 429 | | |
| |||
417 | 433 | | |
418 | 434 | | |
419 | 435 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | 436 | | |
445 | 437 | | |
446 | 438 | | |
| |||
462 | 454 | | |
463 | 455 | | |
464 | 456 | | |
465 | | - | |
| 457 | + | |
466 | 458 | | |
467 | 459 | | |
468 | 460 | | |
469 | 461 | | |
470 | 462 | | |
471 | 463 | | |
472 | | - | |
| 464 | + | |
473 | 465 | | |
474 | 466 | | |
475 | 467 | | |
| |||
484 | 476 | | |
485 | 477 | | |
486 | 478 | | |
487 | | - | |
| 479 | + | |
| 480 | + | |
488 | 481 | | |
489 | 482 | | |
490 | 483 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
Lines changed: 20 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 30 | + | |
| 31 | + | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| |||
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
| |||
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
58 | | - | |
59 | | - | |
| 55 | + | |
| 56 | + | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
67 | 64 | | |
68 | | - | |
| 65 | + | |
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
72 | | - | |
73 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
0 commit comments