Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion dkron/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,3 @@ func TestHealthEndpoint(t *testing.T) {
assert.True(t, hasLeader, "health response should include leader field for server nodes")
}
}
}
4 changes: 4 additions & 0 deletions dkron/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ func (grpcc *GRPCClient) AgentRun(addr string, job *typesv1.Job, execution *type
defer metrics.MeasureSince([]string{"grpc_client", "agent_run"}, time.Now())

maxRetries := grpcc.agent.config.AgentRunMaxRetries
// Clamp maxRetries to 0 if negative to ensure at least one attempt is made
if maxRetries < 0 {
maxRetries = 0
}
initialInterval := grpcc.agent.config.AgentRunRetryInitialInterval
maxInterval := grpcc.agent.config.AgentRunRetryMaxInterval

Expand Down
Loading