-
Notifications
You must be signed in to change notification settings - Fork 917
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
Fix namespace interceptor to allow search attributes operations #3899
Conversation
string namespace = 3; | ||
} | ||
|
||
message RemoveSearchAttributesResponse { | ||
} | ||
|
||
message GetSearchAttributesRequest { | ||
string index_name = 1; | ||
string namespace = 4; | ||
string namespace = 2; |
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.
This is just a fix in the arguments numbers. These are new arguments, and were not updated in tctl or cli yet. It should be safe.
*operatorservice.ListSearchAttributesRequest: | ||
// Namespace is optional for search attributes operations. | ||
// It's required when using SQL DB for visibility, but not when using Elasticsearch. | ||
if !namespaceName.IsEmpty() { |
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 here be a unit test fixing the behavior? |
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
918645f
to
222da72
Compare
@Spikhalskiy Added unit tests. |
What changed?
Let search attributes operations requests to pass without namespace set in the namespace interceptor.
Why?
Namespace interceptor validates the namespace argument of all requests if present.
However, this argument is optional for search attributes operations.
How did you test it?
Start server, and run tctl operations for search attributes no longer returns error "Namespace not set on request".
Potential risks
None.
Is hotfix candidate?
No.