databricks / cli

Databricks CLI
Other
115 stars 39 forks source link

Retain/keep existing job in DAB if it is removed from repo #1515

Closed sivankumar86 closed 1 week ago

sivankumar86 commented 1 week ago

Describe the issue

This is the use case, if old CI/CD pipeline manually triggered with old code base then, latest job is getting wipped out hence, it would be great if there is an option to retain existing job in DAB .

Configuration

  1. Create a yaml file to create a job
  2. remove the yaml file then job is getting deleted in databricks. if there is an option to keep like database delete

Expected Behavior

Existing job should not be deleted if retain option is set

Actual Behavior

It is deleting the job

sivankumar86 commented 1 week ago

like prevent_destroy in terraform

sivankumar86 commented 1 week ago

https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle

andrewnester commented 1 week ago

You can use databricks deployment unbind command to unbind a job from the bundle so it won't managed by dab anymore