def alert_handling_job(event: PrometheusKubernetesAlert, params: JobParams):
    """
    Create a kubernetes job with the specified parameters

    In addition, the job pod receives the following alert parameters as environment variables

    ALERT_NAME

    ALERT_STATUS

    ALERT_OBJ_KIND - oneof pod/deployment/node/job/daemonset or None in case it's unknown

    ALERT_OBJ_NAME

    ALERT_OBJ_NAMESPACE (If present)

    ALERT_OBJ_NODE (If present)

    ALERT_LABEL_{LABEL_NAME} for every label on the alert. For example a label named `foo` becomes `ALERT_LABEL_FOO`

    """
    logging.info(f"Running alert_handling_job alert action for alert {event.alert_name}")
    job_name = to_kubernetes_name(params.name)
    job: Job = Job(
        metadata=ObjectMeta(name=job_name, namespace=params.namespace),
        spec=JobSpec(
            template=PodTemplateSpec(
                spec=PodSpec(
                    containers=[
                        Container(
                            name=params.name,
                            image=params.image,
                            command=params.command,
                            env=__get_alert_env_vars(event, params),
                        )
                    ],
                    serviceAccountName=params.service_account,
                    restartPolicy=params.restart_policy,
                )
            ),
            backoffLimit=params.backoff_limit,
            activeDeadlineSeconds=params.active_deadline_seconds,
            ttlSecondsAfterFinished=params.job_ttl_after_finished,
        ),
    )

    job.create()

    info_messages = []
    if params.notify:
        info_messages.append(f"*Created Job from alert*: {job_name}.")

    if params.wait_for_completion:
        try:
            wait_until_job_complete(job, params.completion_timeout)
            job = hikaru.from_dict(
                job.to_dict(), cls=RobustaJob
            )  # temporary workaround for https://github.com/haxsaw/hikaru/issues/15
            pod = job.get_single_pod()
            event.add_enrichment([FileBlock("job-runner-logs.txt", pod.get_logs())])
        except Exception as e:
            if str(e) != "Failed to reach wait condition":
                warning_msg = f"Error running Job: {e}"
                logging.warning(warning_msg)
                info_messages.append(warning_msg)
            else:
                logging.warning(f"{e} This is the error")
                err_str = "*Status:* Timed out, could not fetch output."
                logging.warning(f"Failed to fetch Job result: {err_str}")
                info_messages.append(err_str)

    if info_messages:
        combined_message = "\n".join(info_messages)
        event.add_enrichment([MarkdownBlock(combined_message)])

    Create a kubernetes job with the specified parameters

    In addition, the job pod receives the following alert parameters as environment variables

    ALERT_NAME

    ALERT_STATUS

    ALERT_OBJ_KIND - oneof pod/deployment/node/job/daemonset or None in case it's unknown

    ALERT_OBJ_NAME

    ALERT_OBJ_NAMESPACE (If present)

    ALERT_OBJ_NODE (If present)

    ALERT_LABEL_{LABEL_NAME} for every label on the alert. For example a label named `foo` becomes `ALERT_LABEL_FOO`

    
playbooks/robusta_playbooks/job_actions.py