Make Allocators.Channel() consistent with thier consistency level

This commit is contained in:
Shingo Omura
2026-02-23 08:59:08 +09:00
parent ab1a549116
commit aa118a464f
3 changed files with 9 additions and 9 deletions

View File

@@ -6038,7 +6038,7 @@ func TestAllocator(t *testing.T,
expectResults: nil,
expectNumAllocateOneInvocations: 16,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 65,
internal.Stable: 65,
},
},
"check-combinations-within-single-request-single-pool-multiple-slices": {
@@ -6060,7 +6060,7 @@ func TestAllocator(t *testing.T,
expectResults: nil,
expectNumAllocateOneInvocations: 16,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 65,
internal.Stable: 65,
},
},
"check-combinations-within-single-request-multiple-pools-multiple-slices": {
@@ -6084,7 +6084,7 @@ func TestAllocator(t *testing.T,
expectResults: nil,
expectNumAllocateOneInvocations: 16,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 65,
internal.Stable: 65,
},
},
"check-combinations-within-single-request-many-pools": {
@@ -6110,7 +6110,7 @@ func TestAllocator(t *testing.T,
expectResults: nil,
expectNumAllocateOneInvocations: 16,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 65,
internal.Stable: 65,
},
},
"check-combinations-with-backtracking": {
@@ -6154,7 +6154,7 @@ func TestAllocator(t *testing.T,
)},
expectNumAllocateOneInvocations: 12,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 14,
internal.Stable: 14,
},
},
"check-combinations-with-backtracking-across-slices-and-pools": {
@@ -6209,7 +6209,7 @@ func TestAllocator(t *testing.T,
)},
expectNumAllocateOneInvocations: 12,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 14,
internal.Stable: 14,
},
},
"check-combinations-with-prioritized-list": {
@@ -6266,7 +6266,7 @@ func TestAllocator(t *testing.T,
)},
expectNumAllocateOneInvocations: 26,
expectNumAllocateOneInvocationsByChannel: map[internal.AllocatorChannel]int64{
internal.Incubating: 32,
internal.Stable: 32,
},
},
}

View File

@@ -145,7 +145,7 @@ func NewAllocator(ctx context.Context,
}
func (a *Allocator) Channel() internal.AllocatorChannel {
return internal.Experimental
return internal.Incubating
}
func (a *Allocator) Allocate(ctx context.Context, node *v1.Node, claims []*resourceapi.ResourceClaim) (finalResult []resourceapi.AllocationResult, finalErr error) {

View File

@@ -104,7 +104,7 @@ func NewAllocator(ctx context.Context,
}
func (a *Allocator) Channel() internal.AllocatorChannel {
return internal.Incubating
return internal.Stable
}
func (a *Allocator) Allocate(ctx context.Context, node *v1.Node, claims []*resourceapi.ResourceClaim) (finalResult []resourceapi.AllocationResult, finalErr error) {