fix: check if runner name is empty and return
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
dc74c45317
commit
b4e7dead1c
1 changed files with 7 additions and 0 deletions
|
|
@ -209,6 +209,13 @@ func (r *basePoolManager) HandleWorkflowJob(job params.WorkflowJob) error {
|
|||
return errors.Wrap(err, "converting job to params")
|
||||
}
|
||||
|
||||
// If job was not assigned to a runner, we can ignore it.
|
||||
if jobParams.RunnerName == "" {
|
||||
slog.InfoContext(
|
||||
r.ctx, "job never got assigned to a runner, ignoring")
|
||||
return nil
|
||||
}
|
||||
|
||||
// update instance workload state.
|
||||
if _, err := r.setInstanceRunnerStatus(jobParams.RunnerName, params.RunnerTerminated); err != nil {
|
||||
if errors.Is(err, runnerErrors.ErrNotFound) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue