Skip to content

Commit

Permalink
Ignore subject_transform_dest in stream sourcing (#4558)
Browse files Browse the repository at this point in the history
This is a safer (less lines of code touched) alternative to #4557 for
now, which simply ignores the `subject_transform_dest` field in the API
and the stream assignments. We'll still look to merge the other PR to
clean up but will do so post-release when we have more time to test it.

Signed-off-by: Neil Twigg <[email protected]>
  • Loading branch information
neilalexander authored Sep 19, 2023
2 parents f6268fd + dff12e4 commit ecbfac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions server/jetstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11575,7 +11575,7 @@ func TestJetStreamMirrorBasics(t *testing.T) {
createStreamServerStreamConfig(&StreamConfig{
Name: "M5",
Storage: FileStorage,
Mirror: &StreamSource{Name: "S1", FilterSubject: "foo", SubjectTransformDest: "foo2"},
Mirror: &StreamSource{Name: "S1", SubjectTransforms: []SubjectTransformConfig{{Source: "foo", Destination: "foo2"}}},
}, 0)

createStreamServerStreamConfig(&StreamConfig{
Expand Down Expand Up @@ -11688,7 +11688,7 @@ func TestJetStreamSourceBasics(t *testing.T) {
Name: "MS",
Storage: FileStorage,
Sources: []*StreamSource{
{Name: "foo", SubjectTransformDest: "foo2.>"},
{Name: "foo", SubjectTransforms: []SubjectTransformConfig{{Source: ">", Destination: "foo2.>"}}},
{Name: "bar"},
{Name: "baz"},
},
Expand Down Expand Up @@ -11770,7 +11770,7 @@ func TestJetStreamSourceBasics(t *testing.T) {
Name: "FMS2",
Storage: FileStorage,
Sources: []*StreamSource{
{Name: "TEST", OptStartSeq: 11, FilterSubject: "dlc", SubjectTransformDest: "dlc2"},
{Name: "TEST", OptStartSeq: 11, SubjectTransforms: []SubjectTransformConfig{{Source: "dlc", Destination: "dlc2"}}},
},
}
createStream(cfg)
Expand Down
4 changes: 2 additions & 2 deletions server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ type StreamSourceInfo struct {
Active time.Duration `json:"active"`
Error *ApiError `json:"error,omitempty"`
FilterSubject string `json:"filter_subject,omitempty"`
SubjectTransformDest string `json:"subject_transform_dest,omitempty"`
SubjectTransformDest string `json:"-"`
SubjectTransforms []SubjectTransformConfig `json:"subject_transforms,omitempty"`
}

Expand All @@ -196,7 +196,7 @@ type StreamSource struct {
OptStartSeq uint64 `json:"opt_start_seq,omitempty"`
OptStartTime *time.Time `json:"opt_start_time,omitempty"`
FilterSubject string `json:"filter_subject,omitempty"`
SubjectTransformDest string `json:"subject_transform_dest,omitempty"`
SubjectTransformDest string `json:"-"`
SubjectTransforms []SubjectTransformConfig `json:"subject_transforms,omitempty"`
External *ExternalStream `json:"external,omitempty"`

Expand Down

0 comments on commit ecbfac8

Please sign in to comment.