Skip to content

Migrated Job Names Break Job Dependencies in New Environment #248

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions