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

[BUG] No minimum validation for top_n_size setting #11

Closed
dzane17 opened this issue Jun 26, 2024 · 2 comments
Closed

[BUG] No minimum validation for top_n_size setting #11

dzane17 opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dzane17
Copy link
Collaborator

dzane17 commented Jun 26, 2024

What is the bug?

There is no minimum for top_n_size setting. Users can set the value to 0 or negative value which does not make sense.

Add minimum constant here -

Update validator function here -

How can one reproduce the bug?

% curl -XPUT "localhost:9200/_cluster/settings?pretty&flat_settings" -H 'Content-Type: application/json' -d '{"transient":{"search.insights.top_queries.latency.top_n_size": "-1"}}' 
{
  "acknowledged" : true,
  "persistent" : { },
  "transient" : {
    "search.insights.top_queries.latency.top_n_size" : "-1"
  }
}

What is the expected behavior?

We should reject all requests which attempt to update less than some minimum value, probably 1.

@dzane17 dzane17 added bug Something isn't working untriaged labels Jun 26, 2024
@deshsidd deshsidd added the good first issue Good for newcomers label Jun 26, 2024
@ansjcy
Copy link
Member

ansjcy commented Jun 26, 2024

[Triage]
@dzane17 Thanks for filing this issue.

@ansjcy ansjcy removed the untriaged label Jun 26, 2024
@ansjcy
Copy link
Member

ansjcy commented Jul 15, 2024

This is fixed as part of #13.

@ansjcy ansjcy closed this as completed Jul 22, 2024
@ansjcy ansjcy self-assigned this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants