Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Yingrong Zhao <[email protected]>
  • Loading branch information
VinozzZ committed Jan 9, 2023
1 parent 8c1ac4f commit 92d7d98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions controllers/agentaction_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,14 @@ func (r *AgentActionReconciler) applyJobToStatus(log logr.Logger, action *porter
setCondition(log, action, porterv1.ConditionStarted, "JobStarted")
}

conditions:
for _, condition := range job.Status.Conditions {
switch condition.Type {
case batchv1.JobComplete:
action.Status.Phase = porterv1.PhaseSucceeded
setCondition(log, action, porterv1.ConditionComplete, "JobCompleted")
break conditions
case batchv1.JobFailed:
action.Status.Phase = porterv1.PhaseFailed
setCondition(log, action, porterv1.ConditionFailed, "JobFailed")
break conditions
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func Vet() {
}

func Lint() {
tools.EnsureStaticCheck()
mg.Deps(tools.EnsureStaticCheck)
must.RunV("staticcheck", "./...")
}

Expand Down

0 comments on commit 92d7d98

Please sign in to comment.