Skip to navigation

Create or update job

View as Markdown

Create a new job or update an existing one. If a job with the same heimdall_job_id exists, it will be updated; otherwise, a new job will be created.

Request

CreateOrUpdateJobRequest is used to create or update a job. If a job with the same heimdall_job_id exists, it will be updated; otherwise, a new job will be created.

workflowIdstringRequired1-256 characters
The workflow ID this job belongs to.
heimdallJobIdstringOptional

The UUID for the job. If not provided, will be computed from job_id and attempt_index.

jobIdstringOptional

Scheduler-specific job identifier.

attemptIndexintegerOptional
The attempt index for this job.
jobNamestringOptional
The name of the job.
allocatedNodeslist of stringsOptional
List of nodes allocated to the job.
gpuCountPerNodeintegerOptional
Number of GPUs per node.
nodeConstraintsobjectOptional
NodeConstraints defines node scheduling constraints for jobs.
additionalPropertiesobjectOptional
JobAdditionalProperties contains additional configuration properties for jobs.
stateenumOptionalDefaults to JOB_STATUS_UNSPECIFIED

JobStatus represents the state of a job.

  • JOB_STATUS_UNSPECIFIED: The status is not specified.
  • JOB_STATUS_PENDING: The job has been created but is not started yet due to being queued, waiting for resources or is pulling container images etc…
  • JOB_STATUS_RUNNING: The job is scheduled and has started running.
  • JOB_STATUS_STOPPED: A stopped job is no longer running or using resources.
  • JOB_STATUS_COMPLETED: The job completed without reporting an error.
  • JOB_STATUS_FAILED: The job exited with an error status.
  • JOB_STATUS_CANCELLED: Job was cancelled by the user or system.
  • JOB_STATUS_DELETED: The job is deleted.
schedulerMetadataobjectOptional

Scheduler-specific metadata (e.g., CRD kind, namespace, labels, annotations).

recoveryConfigobjectOptional
JobRecoveryConfig contains typed recovery policy for scheduler jobs.

Response

A successful response.
jobobjectOptional

Job represents a job tracked by the Advisor, including both actual (observed) and desired (advisor-set) states.