Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated Job Names Break Job Dependencies in New Environment #248

Open
bernie-lawson-databricks opened this issue Mar 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@bernie-lawson-databricks

For customers who have job dependencies, where the workflow references a job by name, after running the migration script, the new job name will be job name + ::: + job id.

def update_imported_job_names(self, error_logger, checkpoint_job_configs_set):
# loop through and update the job names to remove the custom delimiter + job_id suffix
current_jobs_list = self.get_jobs_list()
for job in current_jobs_list:
job_id = job['job_id']
job_name = job['settings']['name']
# job name was set to `old_job_name:::{job_id}` to support duplicate job names
# we need to parse the old job name and update the current jobs
if checkpoint_job_configs_set.contains(job_name):
continue
old_job_name = job_name.split(':::')[0]
new_settings = {'name': old_job_name}
update_args = {'job_id': job_id, 'new_settings': new_settings}
logging.info(f'Updating job name: {update_args}')
resp = self.post('/jobs/update', update_args)
if not logging_utils.log_response_error(error_logger, resp):
checkpoint_job_configs_set.write(job_name)
else:
raise RuntimeError("Import job has failed. Refer to the previous log messages to investigate.")

Customers can update their job names after the fact by removing this id, but it would be good to have an option for customers who are confident they do not have duplicate job names to allow the migrated name to be equal to the old job name.

@bernie-lawson-databricks
Copy link
Author

I did see this closed issue: 140

@gregwood-db gregwood-db added the enhancement New feature or request label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants