Skip to content

Changing source for SQL task from GIT to WORKSPACE #4000

@malthe

Description

@malthe

Describe the issue

If we deploy a sql_task type job with an implicit GIT source (due to git_source being defined on the job), and then subsequently remove that git_source, somehow the task does not correctly register being now in WORKSPACE mode.

We get the error:

Error: cannot update job: Invalid sql_path: /Workspace/[REDACTED]/my_script.sql. Only relative paths are currently supported for remote repositories. Paths must not begin with '/'.

Now, if we explicitly set source: WORKSPACE and deploy, everything's fine. And if I now remove source: WORKSPACE, then it still seems to work correctly.

Steps to reproduce the behavior

  1. Run databricks bundle deploy ... to create initial job definition with git_source set
  2. Remove git_source and change to workspace path
  3. Run databricks bundle deploy ...
  4. See error

Expected Behavior

There should be no error.

Actual Behavior

We get an error that the path is invalid for a remote repository, an invalid error because this is now in workspace mode.

OS and CLI version

Databricks CLI v0.274.0 on MacOS.

Is this a regression?

Not sure.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingDABsDABs related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions