Skip to content
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
9 changes: 5 additions & 4 deletions raycicmd/bk_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,13 @@ func makeRayDockerPlugin(
}

// makeAutomaticRetryConfig creates the retry configuration for rayci pipelines.
// The retry configuration is to retry once for any unknown exit status or
// test failures, and to retry 3 times for known exit statuses.
// The retry configuration is to retry once for any unknown exit status and to
// retry 3 times for known exit statuses. Test failures (exit_status 42) are not
// retried here since bazel already retries those.
func makeAutomaticRetryConfig(exitStatus []int) []any {
m := []any{
map[string]int{"exit_status": 1, "limit": 1}, // unknown exist status
map[string]int{"exit_status": 42, "limit": 1}, // test failures
map[string]int{"exit_status": 1, "limit": 1}, // unknown exist status

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a small typo in the inline comment: "exist status" should be "exit status" to match the terminology used elsewhere in the function.

Suggested change
map[string]int{"exit_status": 1, "limit": 1}, // unknown exist status
map[string]int{"exit_status": 1, "limit": 1}, // unknown exit status

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

// exit_status 42 (test failures) omitted: bazel already retries those.
}
for _, s := range exitStatus {
m = append(m, map[string]any{"exit_status": s, "limit": 3})
Expand Down
Loading