Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extracting redis streams source #1113

Merged
merged 13 commits into from
Oct 1, 2023
Merged

Conversation

juliev0
Copy link
Contributor

@juliev0 juliev0 commented Sep 28, 2023

Redis Streams Source is now a user-defined source in its own repo

Signed-off-by: Julie Vogelman <[email protected]>
Signed-off-by: Julie Vogelman <[email protected]>
Signed-off-by: Julie Vogelman <[email protected]>
Signed-off-by: Julie Vogelman <[email protected]>
Signed-off-by: Julie Vogelman <[email protected]>
Signed-off-by: Julie Vogelman <[email protected]>
@juliev0 juliev0 marked this pull request as ready for review September 29, 2023 03:39
Signed-off-by: Julie Vogelman <[email protected]>
Copy link
Member

@whynowy whynowy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hold on....

@whynowy
Copy link
Member

whynowy commented Sep 29, 2023

Remove the redis streams related types?

@juliev0 juliev0 marked this pull request as draft September 29, 2023 16:25
Signed-off-by: Julie Vogelman <[email protected]>
@juliev0 juliev0 marked this pull request as ready for review September 29, 2023 16:28
@juliev0
Copy link
Contributor Author

juliev0 commented Sep 29, 2023

Remove the redis streams related types?

good call, done

Signed-off-by: Julie Vogelman <[email protected]>
@@ -103,7 +103,7 @@ func ValidatePipeline(pl *dfv1.Pipeline) error {
if s.Source.UDSource.Container == nil || s.Source.UDSource.Container.Image == "" {
return fmt.Errorf("invalid user-defined source vertex %q, a customized image is required", k)
}
if s.Source.HTTP != nil || s.Source.Kafka != nil || s.Source.Nats != nil || s.Source.RedisStreams != nil || s.Source.Generator != nil {
if s.Source.HTTP != nil || s.Source.Kafka != nil || s.Source.Nats != nil || s.Source.Generator != nil {
return fmt.Errorf("invalid user-defined source vertex %q, only one of 'http', 'kafka', 'nats', 'redisStreams', 'generator' and 'udSource' can be specified", k)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove redisStreams from the error msg. Maybe we can do a search across the project to ensure we remove all occurrences of "redisstreams", "redis-streams", etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. You know it's weird, I did do:

grep -r -i "redis*stream" .

from the numaflow root but I guess I still missed it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably because I did it right before I made this particular change to line 106 and then decided I was done :)

@juliev0 juliev0 enabled auto-merge (squash) September 29, 2023 23:18
@@ -36,8 +36,6 @@ type Source struct {
// +optional
Nats *NatsSource `json:"nats,omitempty" protobuf:"bytes,4,opt,name=nats"`
// +optional
RedisStreams *RedisStreamsSource `json:"redisStreams,omitempty" protobuf:"bytes,5,opt,name=redisStreams"`
// +optional
UDTransformer *UDTransformer `json:"transformer,omitempty" protobuf:"bytes,6,opt,name=transformer"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the index?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. But just thinking - For Protobuf, in general, you're not supposed to modify existing indices for backwards compatibility purposes. Does that no longer apply for the Protobuf we generate here? (I'm not really sure exactly how Protobuf is being used in this K8S context - but I suppose as long as the "recipient" is also using this same version then we're fine.)

Copy link
Member

@whynowy whynowy Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think any of our users is using protobuf encoding to communicate to k8s, it should be safe to adjust the index.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@juliev0 juliev0 Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending! In that case, it seems like if something were to use Protobof it would be something which has a running client that can read these or write (create) these, right? I wonder if we would want to have backward compatibility for them, or if they should basically always just adapt to the latest version of the CRD? (I suppose it's a general question for whether to allow changing numbers going forward)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one always keeps backward compatibility, projects like k8s have a deprecation process (e.g. mark the fields as deprecated, and remove them in N releases - the numbers are also updated).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to follow that process at some point in the future? I know we haven't even released v1.0 yet, so as far as I understand we're not worrying about backward compatibility much right now. I am okay to update the numbers if you prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have similar process later on. Thanks!

Signed-off-by: Julie Vogelman <[email protected]>
@juliev0 juliev0 merged commit dae11a7 into numaproj:main Oct 1, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants