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

Proposal: Option to disable DSL #563

Open
galangel opened this issue Jun 29, 2021 · 4 comments
Open

Proposal: Option to disable DSL #563

galangel opened this issue Jun 29, 2021 · 4 comments
Labels
enhancement New feature or request help wanted Community development is encouraged proposal

Comments

@galangel
Copy link
Contributor

galangel commented Jun 29, 2021

Is your feature request related to a problem? Please describe.
Users would sometimes paste and run queries that they have seen on the internet and create high load to the point of DOS.

Describe the solution you'd like
Add a setting option to disable the DSL edit in all relevant places.

add in Stack Management \ Advanced Settings \ Search the option Disable DSL edit.
the option will be a toggle, off by default.

in filter create or edit popover, if the Disable DSL edit is set to true: hide the text button.

Additional context
For example:
Before
dslbefore
After
dslafter

this is a straightforward approach to the issue because we don't see a lot of value in these queries compared to the cost.
but I would like to read your comments about this, or any other suggestion.

@galangel galangel added the enhancement New feature or request label Jun 29, 2021
@JacobBrandt
Copy link

I'm thinking that if this option were to be added then the "Edit as Query DSL" should not be hidden but placed in a disabled state that upon hover tells the user they can enable this feature in the advanced setting. Otherwise this repo will get tons of bug tickets suggesting that the DSL option is missing on version X.

Also, keep in mind that with this option disabled it still won't disable users from issuing those same requests. A savvy enough user can use the same search API endpoint the tool uses.

@tmarkley tmarkley added proposal help wanted Community development is encouraged labels Sep 1, 2021
@ahopp
Copy link
Contributor

ahopp commented Sep 1, 2021

@galangel In terms of limiting the accessibility to end users, what do you think of @JacobBrandt's proposal. I understand the preference to reduce unintentional high load events, but I think a disabled state that provides an explanation would be a good first step. If that signal isn't loud enough we can add additional signal when users seek to enable in advanced settings.

Additionally, I'm a bit torn on the disable by default. Does anyone else have thoughts on value in these queries versus risk (e.g. cost or high loads)? I'd want to avoid additional friction when using "Edit as DSL" if the value v cost asymmetry isn't consistent with other users.

@JacobBrandt
Copy link

JacobBrandt commented Sep 1, 2021

@ahopp I missed that this was proposing to have this disabled by default. My feelings towards decisions like this are always:

  • Provide all features out of the box (because it showcases what the tool can do)
  • Allow configuration options to disable features (this way businesses can remove features they find to not have "a lot of value" for their use case)

Keep in mind, using the DSL is the only way to use all of the additional options query clauses have.

@wbeckler
Copy link

I think there's a related need, which is to block, or at least warn, queries that hit large time ranges or which otherwise lack enough filters. Admins have been asking for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Community development is encouraged proposal
Projects
None yet
Development

No branches or pull requests

5 participants