

def build_job_update(self, ctxt, build_id, status, description, created_image_id, docker_image_name, assembly_id):
    to_update = {
        'status': status,
        'external_ref': created_image_id,
        'docker_image_name': docker_image_name,
        'description': str(description),
    }
    try:
        objects.registry.Image.update_and_save(ctxt, build_id, to_update)
    except sqla_exc.SQLAlchemyError as ex:
        LOG.error(('Failed to update image, ID: %s' % build_id))
        LOG.exception(ex)
    if (comp is None):
        return
    try:
        assem = objects.registry.Assembly.get_by_id(ctxt, assembly_id)
        if (assem.status == ASSEMBLY_STATES.DELETING):
            return
        if (not any([comp for comp in assem.components if ('Image_Build' in comp.description)])):
            comp_name = ('Heat_Stack_for_%s' % assem.name)
            stack_id = None
            if (assem.heat_stack_component is not None):
                stack_id = assem.heat_stack_component.heat_stack_id
            objects.registry.Component.assign_and_create(ctxt, assem, comp_name, 'Image_Build', 'Image Build job', created_image_id, stack_id)
            assem_update = {
                'image_id': build_id,
            }
            objects.registry.Assembly.update_and_save(ctxt, assembly_id, assem_update)
    except sqla_exc.IntegrityError:
        LOG.error(('IntegrityError in creating Image_Build component, assembly %s may be deleted' % assembly_id))

dataset/ETHPy150Open openstack/solum/solum/conductor/handlers/default.py Handler.build_job_update/VarMisuse@103/172 `assembly_id`->`comp`