Skip to content

Commit 1360f25

Browse files
authored
Merge pull request #87 from Gekko0114/patch
nit: change cyclestate's message
2 parents 05e90ae + b1c8280 commit 1360f25

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

guest/testdata/cyclestate/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (statePlugin) Filter(state api.CycleState, pod proto.Pod, _ api.NodeInfo) (
124124

125125
func (statePlugin) PostFilter(state api.CycleState, pod proto.Pod, _ api.NodeToStatus) (nominatedNodeName string, nominatingMode api.NominatingMode, status *api.Status) {
126126
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
127-
panic("didn't cache pod from filter")
127+
panic("didn't cache pod from pre-filter")
128128
}
129129
mustNotScoreState(state)
130130
if val, ok := state.Read(preFilterStateKey); !ok {
@@ -150,7 +150,7 @@ func (statePlugin) PreScore(state api.CycleState, pod proto.Pod, _ proto.NodeLis
150150

151151
func (statePlugin) Score(state api.CycleState, pod proto.Pod, _ string) (score int32, status *api.Status) {
152152
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
153-
panic("didn't cache pod from pre-score")
153+
panic("didn't cache pod from pre-filter")
154154
}
155155
mustFilterState(state)
156156
if val, ok := state.Read(preScoreStateKey); !ok {
@@ -163,7 +163,7 @@ func (statePlugin) Score(state api.CycleState, pod proto.Pod, _ string) (score i
163163

164164
func (statePlugin) NormalizeScore(state api.CycleState, pod proto.Pod, _ api.NodeScore) (scores map[string]int, status *api.Status) {
165165
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
166-
panic("didn't cache pod from pre-score")
166+
panic("didn't cache pod from pre-filter")
167167
}
168168
mustFilterState(state)
169169
if val, ok := state.Read(preScoreStateKey); !ok {
@@ -178,7 +178,7 @@ func (statePlugin) NormalizeScore(state api.CycleState, pod proto.Pod, _ api.Nod
178178

179179
func (statePlugin) PreBind(state api.CycleState, pod proto.Pod, _ string) (status *api.Status) {
180180
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
181-
panic("didn't cache pod from score")
181+
panic("didn't cache pod from pre-filter")
182182
}
183183
if _, ok := state.Read(preBindStateKey); ok {
184184
panic("didn't reset pre-bind state on pre-bind")
@@ -190,7 +190,7 @@ func (statePlugin) PreBind(state api.CycleState, pod proto.Pod, _ string) (statu
190190

191191
func (statePlugin) Bind(state api.CycleState, pod proto.Pod, _ string) (status *api.Status) {
192192
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
193-
panic("didn't cache pod from pre-bind")
193+
panic("didn't cache pod from pre-filter")
194194
}
195195
if val, ok := state.Read(preBindStateKey); !ok {
196196
panic("didn't propagate pre-bind state from pre-bind")
@@ -202,7 +202,7 @@ func (statePlugin) Bind(state api.CycleState, pod proto.Pod, _ string) (status *
202202

203203
func (statePlugin) PostBind(state api.CycleState, pod proto.Pod, _ string) {
204204
if unsafe.Pointer(pod.Spec()) != unsafe.Pointer(podSpec) {
205-
panic("didn't cache pod from pre-bind")
205+
panic("didn't cache pod from pre-filter")
206206
}
207207
if val, ok := state.Read(preBindStateKey); !ok {
208208
panic("didn't propagate pre-bind state from pre-bind")
-160 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)