Scheduler: LastOrdinal based on replicas instead of FreeCap #6984
knative-style.yaml
on: pull_request
style
/
changes
3s
style
/
...
/
Auto-format and Check
20s
style
/
...
/
Lint
3m 31s
style
/
...
/
Do Not Submit
9s
style
/
...
/
shell
0s
style
/
...
/
yaml
0s
style
/
...
/
github_actions
0s
Matrix: style / Golang / Boilerplate Check
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
|