Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: fast return if runner-group server is not found #143

Merged
merged 1 commit into from
Dec 18, 2024
Merged
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
8 changes: 8 additions & 0 deletions contrib/internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ func DeployRunnerGroup(ctx context.Context,
// Using 1 min as timeout is to ensure we can get result in time.
data, err := kr.RGResult(ctx, 1*time.Minute)
if err != nil {
// FIXME(weifu): If the pod is not found, we should fast
// return. However, it's hard to maintain error string
// match. We should use specific commandline error code
// or use package instead of binary call.
if strings.Contains(err.Error(), `pods "runnergroup-server" not found`) {
return nil, err
}

klog.ErrorS(err, "failed to fetch runner group's result")
continue
}
Expand Down
Loading