Skip to content

Commit

Permalink
fix: treat ALL user-defined source vertices as scalable (#1132)
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang authored Oct 2, 2023
1 parent 408ff38 commit a7adee1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apis/numaflow/v1alpha1/vertex_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (v Vertex) Scalable() bool {
}
if v.IsASource() {
src := v.Spec.Source
if src.Kafka != nil {
if src.Kafka != nil || src.UDSource != nil {
return true
}
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/numaflow/v1alpha1/vertex_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ func TestScalable(t *testing.T) {
Kafka: &KafkaSource{},
}
assert.True(t, v.Scalable())
v.Spec.Source = &Source{
UDSource: &UDSource{},
}
assert.True(t, v.Scalable())
}

func Test_Scale_Parameters(t *testing.T) {
Expand Down

0 comments on commit a7adee1

Please sign in to comment.