Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Levine <[email protected]>
  • Loading branch information
hugoShaka and sclevine authored Dec 17, 2024
1 parent 0487d7d commit 529b979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/autoupdate/rollout/strategy_haltonerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ func (h *haltOnErrorStrategy) progressRollout(ctx context.Context, groups []*aut
}

func canStartHaltOnError(group, previousGroup *autoupdate.AutoUpdateAgentRolloutStatusGroup, now time.Time) (bool, error) {
// check wait days
// check wait hours
if group.ConfigWaitHours != 0 {
if previousGroup == nil {
return false, trace.BadParameter("The first group cannot have non-zero wait hours")
return false, trace.BadParameter("the first group cannot have non-zero wait hours")
}

previousStart := previousGroup.StartTime.AsTime()
Expand Down
2 changes: 1 addition & 1 deletion lib/autoupdate/rollout/strategy_haltonerror_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Test_canStartHaltOnError(t *testing.T) {
wantErr require.ErrorAssertionFunc
}{
{
name: "first group, no wait_days",
name: "first group, no wait_hours",
group: &autoupdate.AutoUpdateAgentRolloutStatusGroup{
Name: "test-group",
ConfigDays: everyWeekday,
Expand Down

0 comments on commit 529b979

Please sign in to comment.