File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed
packages/databricks-vscode
resources/migration-template Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 373373 },
374374 {
375375 "view" : " configurationView" ,
376- "contents" : " [Create a new Databricks Project](command:databricks.bundle.initNewProject )" ,
377- "when" : " workspaceFolderCount > 0 && databricks.context.initialized"
376+ "contents" : " Migrate current workspace to a Databricks Project: \n [Migrate to a Databricks Project](command:databricks.bundle.startManualMigration )" ,
377+ "when" : " workspaceFolderCount > 0 && databricks.context.initialized && databricks.context.pendingManualMigration "
378378 },
379379 {
380380 "view" : " configurationView" ,
381- "contents" : " Migrate current workspace to a Databricks Project: \n [Migrate to Databricks Project](command:databricks.bundle.startManualMigration )" ,
382- "when" : " workspaceFolderCount > 0 && databricks.context.initialized && databricks.context.pendingManualMigration "
381+ "contents" : " [Create a new Databricks Project](command:databricks.bundle.initNewProject )" ,
382+ "when" : " workspaceFolderCount > 0 && databricks.context.initialized"
383383 },
384384 {
385385 "view" : " configurationView" ,
Original file line number Diff line number Diff line change 11{
22 "properties" : {
3+ "auto_migration" : {
4+ "type" : " boolean" ,
5+ "description" : " Auto migration" ,
6+ "order" : 1
7+ },
38 "project_name" : {
49 "type" : " string" ,
510 "description" : " Project name" ,
Original file line number Diff line number Diff line change 11# This is a Databricks asset bundle definition for {{.project_name}}.
2+ {{- if .auto_migration}}
3+ # The file was generated automatically by the Databricks extension.
4+ # It's based on the configuration located in `.databricks/project.json`.
5+ # If you don't want this file to be created automatically, remove the `.databricks/project.json`.
6+ {{- else}}
27# The Databricks extension requires databricks.yml configuration file.
8+ {{- end}}
39# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
410
511bundle:
Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ export class BundleProjectManager {
223223 }
224224 await this . migrateProjectJsonToBundle (
225225 authProvider as ProfileAuthProvider ,
226- legacyProjectConfig
226+ legacyProjectConfig ,
227+ true
227228 ) ;
228229 recordEvent ( { success : true } ) ;
229230 }
@@ -260,11 +261,13 @@ export class BundleProjectManager {
260261
261262 private async migrateProjectJsonToBundle (
262263 authProvider : ProfileAuthProvider ,
263- legacyProjectConfig ?: ProjectConfigFile
264+ legacyProjectConfig ?: ProjectConfigFile ,
265+ autoMigration : boolean = false
264266 ) {
265267 const configVars = {
266268 /* eslint-disable @typescript-eslint/naming-convention */
267269 project_name : path . basename ( this . workspaceUri . fsPath ) ,
270+ auto_migration : autoMigration ,
268271 compute_id : legacyProjectConfig ?. clusterId ,
269272 root_path : legacyProjectConfig ?. workspacePath ?. path ,
270273 /* eslint-enable @typescript-eslint/naming-convention */
You can’t perform that action at this time.
0 commit comments