-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[CCR] Add get auto follow pattern api #33849
[CCR] Add get auto follow pattern api #33849
Conversation
Pinging @elastic/es-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martijnvg This looks great to me, but I am wondering if we should not enforce the GET request always require one clusterAlias. Should we return all auto-patterns if the clusterAlias is omitted? Thank you!
@dnhatn Thanks for reviewing. I made the clusterAlias parameter optional and in that case all auto follow patterns are returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment to discuss.
|
||
public static class Response extends ActionResponse implements ToXContentObject { | ||
|
||
private List<AutoFollowPattern> autoFollowPatterns; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return a map of "clusterAlias" to auto-follow patterns instead of a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if we add clusterAlias to AutoFollowPattern
then we can return a map. I will add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed this commit to let the auto follow patterns to be returned as a map: 96bf947
the cluster alias as key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @martijnvg.
Relates to #33007