Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions api/openapi.codegen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6001,6 +6001,15 @@ components:
- 'null'
command:
type: string
compute_node_id:
type:
- integer
- 'null'
format: int64
description: |-
Compute node executing the current attempt. Set by start_job and cleared
by complete_job and the reset/retry paths. For completed attempts, the
compute node is recorded on the result record.
depends_on_job_ids:
type:
- array
Expand Down Expand Up @@ -6092,6 +6101,14 @@ components:
- integer
- 'null'
format: int64
start_time:
type:
- string
- 'null'
description: |-
Timestamp when the current attempt began running. Set by start_job and
cleared by complete_job and the reset/retry paths. NULL when the job is
not running (use `status` as the source of truth for "is running").
status:
$ref: '#/components/schemas/JobStatus'
supports_termination:
Expand Down
17 changes: 17 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6001,6 +6001,15 @@ components:
- 'null'
command:
type: string
compute_node_id:
type:
- integer
- 'null'
format: int64
description: |-
Compute node executing the current attempt. Set by start_job and cleared
by complete_job and the reset/retry paths. For completed attempts, the
compute node is recorded on the result record.
depends_on_job_ids:
type:
- array
Expand Down Expand Up @@ -6092,6 +6101,14 @@ components:
- integer
- 'null'
format: int64
start_time:
type:
- string
- 'null'
description: |-
Timestamp when the current attempt began running. Set by start_job and
cleared by complete_job and the reset/retry paths. NULL when the job is
not running (use `status` as the source of truth for "is running").
status:
$ref: '#/components/schemas/JobStatus'
supports_termination:
Expand Down
19 changes: 16 additions & 3 deletions julia_client/Torc/src/api/models/model_JobModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
attempt_id=nothing,
cancel_on_blocking_job_failure=nothing,
command=nothing,
compute_node_id=nothing,
depends_on_job_ids=nothing,
env=nothing,
failure_handler_id=nothing,
Expand All @@ -23,6 +24,7 @@
resource_requirements_id=nothing,
schedule_compute_nodes=nothing,
scheduler_id=nothing,
start_time=nothing,
status=nothing,
supports_termination=nothing,
workflow_id=nothing,
Expand All @@ -31,6 +33,7 @@
- attempt_id::Int64
- cancel_on_blocking_job_failure::Bool
- command::String
- compute_node_id::Int64 : Compute node executing the current attempt. Set by start_job and cleared by complete_job and the reset/retry paths. For completed attempts, the compute node is recorded on the result record.
- depends_on_job_ids::Vector{Int64}
- env::Dict{String, String}
- failure_handler_id::Int64
Expand All @@ -46,6 +49,7 @@
- resource_requirements_id::Int64
- schedule_compute_nodes::ComputeNodeSchedule
- scheduler_id::Int64
- start_time::String : Timestamp when the current attempt began running. Set by start_job and cleared by complete_job and the reset/retry paths. NULL when the job is not running (use `status` as the source of truth for \"is running\").
- status::JobStatus
- supports_termination::Bool
- workflow_id::Int64
Expand All @@ -54,6 +58,7 @@ Base.@kwdef mutable struct JobModel <: OpenAPI.APIModel
attempt_id::Union{Nothing, Int64} = nothing
cancel_on_blocking_job_failure::Union{Nothing, Bool} = nothing
command::Union{Nothing, String} = nothing
compute_node_id::Union{Nothing, Int64} = nothing
depends_on_job_ids::Union{Nothing, Vector{Int64}} = nothing
env::Union{Nothing, Dict{String, String}} = nothing
failure_handler_id::Union{Nothing, Int64} = nothing
Expand All @@ -69,18 +74,19 @@ Base.@kwdef mutable struct JobModel <: OpenAPI.APIModel
resource_requirements_id::Union{Nothing, Int64} = nothing
schedule_compute_nodes = nothing # spec type: Union{ Nothing, ComputeNodeSchedule }
scheduler_id::Union{Nothing, Int64} = nothing
start_time::Union{Nothing, String} = nothing
status = nothing # spec type: Union{ Nothing, JobStatus }
supports_termination::Union{Nothing, Bool} = nothing
workflow_id::Union{Nothing, Int64} = nothing

function JobModel(attempt_id, cancel_on_blocking_job_failure, command, depends_on_job_ids, env, failure_handler_id, id, input_file_ids, input_user_data_ids, invocation_script, name, origin, output_file_ids, output_user_data_ids, priority, resource_requirements_id, schedule_compute_nodes, scheduler_id, status, supports_termination, workflow_id, )
o = new(attempt_id, cancel_on_blocking_job_failure, command, depends_on_job_ids, env, failure_handler_id, id, input_file_ids, input_user_data_ids, invocation_script, name, origin, output_file_ids, output_user_data_ids, priority, resource_requirements_id, schedule_compute_nodes, scheduler_id, status, supports_termination, workflow_id, )
function JobModel(attempt_id, cancel_on_blocking_job_failure, command, compute_node_id, depends_on_job_ids, env, failure_handler_id, id, input_file_ids, input_user_data_ids, invocation_script, name, origin, output_file_ids, output_user_data_ids, priority, resource_requirements_id, schedule_compute_nodes, scheduler_id, start_time, status, supports_termination, workflow_id, )
o = new(attempt_id, cancel_on_blocking_job_failure, command, compute_node_id, depends_on_job_ids, env, failure_handler_id, id, input_file_ids, input_user_data_ids, invocation_script, name, origin, output_file_ids, output_user_data_ids, priority, resource_requirements_id, schedule_compute_nodes, scheduler_id, start_time, status, supports_termination, workflow_id, )
OpenAPI.validate_properties(o)
return o
end
end # type JobModel

const _property_types_JobModel = Dict{Symbol,String}(Symbol("attempt_id")=>"Int64", Symbol("cancel_on_blocking_job_failure")=>"Bool", Symbol("command")=>"String", Symbol("depends_on_job_ids")=>"Vector{Int64}", Symbol("env")=>"Dict{String, String}", Symbol("failure_handler_id")=>"Int64", Symbol("id")=>"Int64", Symbol("input_file_ids")=>"Vector{Int64}", Symbol("input_user_data_ids")=>"Vector{Int64}", Symbol("invocation_script")=>"String", Symbol("name")=>"String", Symbol("origin")=>"String", Symbol("output_file_ids")=>"Vector{Int64}", Symbol("output_user_data_ids")=>"Vector{Int64}", Symbol("priority")=>"Int64", Symbol("resource_requirements_id")=>"Int64", Symbol("schedule_compute_nodes")=>"ComputeNodeSchedule", Symbol("scheduler_id")=>"Int64", Symbol("status")=>"JobStatus", Symbol("supports_termination")=>"Bool", Symbol("workflow_id")=>"Int64", )
const _property_types_JobModel = Dict{Symbol,String}(Symbol("attempt_id")=>"Int64", Symbol("cancel_on_blocking_job_failure")=>"Bool", Symbol("command")=>"String", Symbol("compute_node_id")=>"Int64", Symbol("depends_on_job_ids")=>"Vector{Int64}", Symbol("env")=>"Dict{String, String}", Symbol("failure_handler_id")=>"Int64", Symbol("id")=>"Int64", Symbol("input_file_ids")=>"Vector{Int64}", Symbol("input_user_data_ids")=>"Vector{Int64}", Symbol("invocation_script")=>"String", Symbol("name")=>"String", Symbol("origin")=>"String", Symbol("output_file_ids")=>"Vector{Int64}", Symbol("output_user_data_ids")=>"Vector{Int64}", Symbol("priority")=>"Int64", Symbol("resource_requirements_id")=>"Int64", Symbol("schedule_compute_nodes")=>"ComputeNodeSchedule", Symbol("scheduler_id")=>"Int64", Symbol("start_time")=>"String", Symbol("status")=>"JobStatus", Symbol("supports_termination")=>"Bool", Symbol("workflow_id")=>"Int64", )
OpenAPI.property_type(::Type{ JobModel }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_JobModel[name]))}

function OpenAPI.check_required(o::JobModel)
Expand All @@ -94,6 +100,7 @@ function OpenAPI.validate_properties(o::JobModel)
OpenAPI.validate_property(JobModel, Symbol("attempt_id"), o.attempt_id)
OpenAPI.validate_property(JobModel, Symbol("cancel_on_blocking_job_failure"), o.cancel_on_blocking_job_failure)
OpenAPI.validate_property(JobModel, Symbol("command"), o.command)
OpenAPI.validate_property(JobModel, Symbol("compute_node_id"), o.compute_node_id)
OpenAPI.validate_property(JobModel, Symbol("depends_on_job_ids"), o.depends_on_job_ids)
OpenAPI.validate_property(JobModel, Symbol("env"), o.env)
OpenAPI.validate_property(JobModel, Symbol("failure_handler_id"), o.failure_handler_id)
Expand All @@ -109,6 +116,7 @@ function OpenAPI.validate_properties(o::JobModel)
OpenAPI.validate_property(JobModel, Symbol("resource_requirements_id"), o.resource_requirements_id)
OpenAPI.validate_property(JobModel, Symbol("schedule_compute_nodes"), o.schedule_compute_nodes)
OpenAPI.validate_property(JobModel, Symbol("scheduler_id"), o.scheduler_id)
OpenAPI.validate_property(JobModel, Symbol("start_time"), o.start_time)
OpenAPI.validate_property(JobModel, Symbol("status"), o.status)
OpenAPI.validate_property(JobModel, Symbol("supports_termination"), o.supports_termination)
OpenAPI.validate_property(JobModel, Symbol("workflow_id"), o.workflow_id)
Expand All @@ -122,6 +130,10 @@ function OpenAPI.validate_property(::Type{ JobModel }, name::Symbol, val)



if name === Symbol("compute_node_id")
OpenAPI.validate_param(name, "JobModel", :format, val, "int64")
end



if name === Symbol("failure_handler_id")
Expand Down Expand Up @@ -157,6 +169,7 @@ function OpenAPI.validate_property(::Type{ JobModel }, name::Symbol, val)




if name === Symbol("workflow_id")
OpenAPI.validate_param(name, "JobModel", :format, val, "int64")
end
Expand Down
2 changes: 2 additions & 0 deletions julia_client/julia_client/docs/JobModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**attempt_id** | **Int64** | | [optional] [default to nothing]
**cancel_on_blocking_job_failure** | **Bool** | | [optional] [default to nothing]
**command** | **String** | | [default to nothing]
**compute_node_id** | **Int64** | Compute node executing the current attempt. Set by start_job and cleared by complete_job and the reset/retry paths. For completed attempts, the compute node is recorded on the result record. | [optional] [default to nothing]
**depends_on_job_ids** | **Vector{Int64}** | | [optional] [default to nothing]
**env** | **Dict{String, String}** | | [optional] [default to nothing]
**failure_handler_id** | **Int64** | | [optional] [default to nothing]
Expand All @@ -22,6 +23,7 @@ Name | Type | Description | Notes
**resource_requirements_id** | **Int64** | | [optional] [default to nothing]
**schedule_compute_nodes** | [***ComputeNodeSchedule**](ComputeNodeSchedule.md) | | [optional] [default to nothing]
**scheduler_id** | **Int64** | | [optional] [default to nothing]
**start_time** | **String** | Timestamp when the current attempt began running. Set by start_job and cleared by complete_job and the reset/retry paths. NULL when the job is not running (use &#x60;status&#x60; as the source of truth for \&quot;is running\&quot;). | [optional] [default to nothing]
**status** | [***JobStatus**](JobStatus.md) | | [optional] [default to nothing]
**supports_termination** | **Bool** | | [optional] [default to nothing]
**workflow_id** | **Int64** | | [default to nothing]
Expand Down
16 changes: 15 additions & 1 deletion python_client/src/torc/openapi_client/models/job_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class JobModel(BaseModel):
attempt_id: Optional[StrictInt] = None
cancel_on_blocking_job_failure: Optional[StrictBool] = None
command: StrictStr
compute_node_id: Optional[StrictInt] = Field(default=None, description="Compute node executing the current attempt. Set by start_job and cleared by complete_job and the reset/retry paths. For completed attempts, the compute node is recorded on the result record.")
depends_on_job_ids: Optional[List[StrictInt]] = None
env: Optional[Dict[str, StrictStr]] = None
failure_handler_id: Optional[StrictInt] = None
Expand All @@ -47,10 +48,11 @@ class JobModel(BaseModel):
resource_requirements_id: Optional[StrictInt] = None
schedule_compute_nodes: Optional[ComputeNodeSchedule] = None
scheduler_id: Optional[StrictInt] = None
start_time: Optional[StrictStr] = Field(default=None, description="Timestamp when the current attempt began running. Set by start_job and cleared by complete_job and the reset/retry paths. NULL when the job is not running (use `status` as the source of truth for \"is running\").")
status: Optional[JobStatus] = None
supports_termination: Optional[StrictBool] = None
workflow_id: StrictInt
__properties: ClassVar[List[str]] = ["attempt_id", "cancel_on_blocking_job_failure", "command", "depends_on_job_ids", "env", "failure_handler_id", "id", "input_file_ids", "input_user_data_ids", "invocation_script", "name", "origin", "output_file_ids", "output_user_data_ids", "priority", "resource_requirements_id", "schedule_compute_nodes", "scheduler_id", "status", "supports_termination", "workflow_id"]
__properties: ClassVar[List[str]] = ["attempt_id", "cancel_on_blocking_job_failure", "command", "compute_node_id", "depends_on_job_ids", "env", "failure_handler_id", "id", "input_file_ids", "input_user_data_ids", "invocation_script", "name", "origin", "output_file_ids", "output_user_data_ids", "priority", "resource_requirements_id", "schedule_compute_nodes", "scheduler_id", "start_time", "status", "supports_termination", "workflow_id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -104,6 +106,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.cancel_on_blocking_job_failure is None and "cancel_on_blocking_job_failure" in self.model_fields_set:
_dict['cancel_on_blocking_job_failure'] = None

# set to None if compute_node_id (nullable) is None
# and model_fields_set contains the field
if self.compute_node_id is None and "compute_node_id" in self.model_fields_set:
_dict['compute_node_id'] = None

# set to None if depends_on_job_ids (nullable) is None
# and model_fields_set contains the field
if self.depends_on_job_ids is None and "depends_on_job_ids" in self.model_fields_set:
Expand Down Expand Up @@ -164,6 +171,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.scheduler_id is None and "scheduler_id" in self.model_fields_set:
_dict['scheduler_id'] = None

# set to None if start_time (nullable) is None
# and model_fields_set contains the field
if self.start_time is None and "start_time" in self.model_fields_set:
_dict['start_time'] = None

# set to None if supports_termination (nullable) is None
# and model_fields_set contains the field
if self.supports_termination is None and "supports_termination" in self.model_fields_set:
Expand All @@ -184,6 +196,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"attempt_id": obj.get("attempt_id"),
"cancel_on_blocking_job_failure": obj.get("cancel_on_blocking_job_failure"),
"command": obj.get("command"),
"compute_node_id": obj.get("compute_node_id"),
"depends_on_job_ids": obj.get("depends_on_job_ids"),
"env": obj.get("env"),
"failure_handler_id": obj.get("failure_handler_id"),
Expand All @@ -199,6 +212,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"resource_requirements_id": obj.get("resource_requirements_id"),
"schedule_compute_nodes": ComputeNodeSchedule.from_dict(obj["schedule_compute_nodes"]) if obj.get("schedule_compute_nodes") is not None else None,
"scheduler_id": obj.get("scheduler_id"),
"start_time": obj.get("start_time"),
"status": obj.get("status"),
"supports_termination": obj.get("supports_termination"),
"workflow_id": obj.get("workflow_id")
Expand Down
Loading
Loading