Skip to content

Scheduler: LastOrdinal based on replicas instead of FreeCap #6984

Scheduler: LastOrdinal based on replicas instead of FreeCap

Scheduler: LastOrdinal based on replicas instead of FreeCap #6984

Triggered via pull request December 16, 2024 14:40
Status Failure
Total duration 3m 55s
Artifacts

knative-style.yaml

on: pull_request
style  /  changes
3s
style / changes
style  /  ...  /  Auto-format and Check
20s
style / Golang / Auto-format and Check
style  /  ...  /  Lint
3m 31s
style / Golang / Lint
style  /  ...  /  Do Not Submit
9s
style / Golang / Do Not Submit
style  /  ...  /  shell
0s
style / suggester / shell
style  /  ...  /  yaml
0s
style / suggester / yaml
style  /  ...  /  github_actions
0s
style / suggester / github_actions
Matrix: style / Golang / Boilerplate Check
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 6 warnings
style / Golang / Auto-format and Check: pkg/scheduler/statefulset/autoscaler.go#L1
Please run goimports. diff --git a/pkg/scheduler/statefulset/autoscaler.go b/pkg/scheduler/statefulset/autoscaler.go index b50f05c..2e28352 100644 --- a/pkg/scheduler/statefulset/autoscaler.go +++ b/pkg/scheduler/statefulset/autoscaler.go @@ -250,7 +250,7 @@ func (a *autoscaler) mayCompact(logger *zap.SugaredLogger, s *st.State) error { zap.Any("state", s), ) - lastOrdinal := s.Replicas-1 + lastOrdinal := s.Replicas - 1 // when there is only one pod there is nothing to move or number of pods is just enough! if lastOrdinal < 1 || len(s.SchedulablePods) <= 1 { @@ -282,7 +282,7 @@ func (a *autoscaler) compact(s *st.State) error { return err } - lastOrdinal := s.Replicas-1 + lastOrdinal := s.Replicas - 1 for _, vpod := range vpods { placements := vpod.GetPlacements()
style / Golang / Auto-format and Check
Process completed with exit code 1.
style / changes
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
style / Golang / Do Not Submit
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
style / Golang / Boilerplate Check (go)
Restore cache failed: Dependencies file is not found in /home/runner/work/eventing/eventing. Supported file pattern: go.sum
style / Golang / Auto-format and Check
Restore cache failed: Dependencies file is not found in /home/runner/work/eventing/eventing. Supported file pattern: go.sum
style / Golang / Boilerplate Check (sh)
Restore cache failed: Dependencies file is not found in /home/runner/work/eventing/eventing. Supported file pattern: go.sum
style / Golang / Lint
Restore cache failed: Dependencies file is not found in /home/runner/work/eventing/eventing. Supported file pattern: go.sum