Skip to content

Commit

Permalink
Remove duplicate field in replicasummary (#716)
Browse files Browse the repository at this point in the history
* remove StartTime and use existing ContainerStarted instead since they defined the same property from pod

* remove deprecated and unused fields

* generate swagger
  • Loading branch information
nilsgstrabo authored Jan 8, 2025
1 parent df8dd9a commit 6f05006
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 33 deletions.
6 changes: 0 additions & 6 deletions api/deployments/models/component_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,6 @@ type ReplicaSummary struct {
// swagger:strfmt date-time
Created time.Time `json:"created"`

// The time at which the batch job's pod startedAt
//
// required: false
// swagger:strfmt date-time
StartTime *time.Time `json:"startTime"`

// The time at which the batch job's pod finishedAt.
//
// required: false
Expand Down
11 changes: 0 additions & 11 deletions api/deployments/models/scheduled_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,6 @@ type ScheduledBatchSummary struct {
// example: Waiting
Status ScheduledBatchJobStatus `json:"status"`

// Deprecated: Message of a status, if any, of the job
//
// required: false
// example: "Error occurred"
Message string `json:"message,omitempty"`

// Deprecated: ReplicaSummary
//
// required: false
Replica *ReplicaSummary `json:"replica,omitempty"`

// TotalJobCount count of jobs, requested to be scheduled by a batch
//
// required: true
Expand Down
2 changes: 1 addition & 1 deletion api/models/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func GetReplicaSummaryByJobPodStatus(radixBatchJob radixv1.RadixBatchJob, jobPod
Status: models.ReplicaStatus{Status: getReplicaStatusByPodStatus(jobPodStatus.Phase)},
}
if jobPodStatus.StartTime != nil {
summary.StartTime = &jobPodStatus.StartTime.Time
summary.ContainerStarted = &jobPodStatus.StartTime.Time
}
if jobPodStatus.EndTime != nil {
summary.EndTime = &jobPodStatus.EndTime.Time
Expand Down
15 changes: 0 additions & 15 deletions swaggerui/html/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7926,12 +7926,6 @@
"format": "int32",
"x-go-name": "RestartCount"
},
"startTime": {
"description": "The time at which the batch job's pod startedAt",
"type": "string",
"format": "date-time",
"x-go-name": "StartTime"
},
"statusMessage": {
"description": "StatusMessage provides message describing the status of a component container inside a pod",
"type": "string",
Expand Down Expand Up @@ -8047,21 +8041,12 @@
},
"x-go-name": "JobList"
},
"message": {
"description": "Deprecated: Message of a status, if any, of the job",
"type": "string",
"x-go-name": "Message",
"example": "\"Error occurred\""
},
"name": {
"description": "Name of the scheduled batch",
"type": "string",
"x-go-name": "Name",
"example": "batch-20181029135644-algpv-6hznh"
},
"replica": {
"$ref": "#/definitions/ReplicaSummary"
},
"started": {
"description": "Started timestamp",
"type": "string",
Expand Down

0 comments on commit 6f05006

Please sign in to comment.