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

[8.16] Allow empty spaces un Gsub processor (#197815) #199292

Closed

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.16:

Questions ?

Please refer to the Backport tool documentation

Closes [elastic#191920](elastic#191920)

## Summary
In the pattern field of the GSUB processor, we were validating that the
field is not empty. But for this case we must allow spaces as values. To
fix this, I've added a second parameter `trimString` to the `emptyField`
validator. If the parameter is set to true by default so the behavior of
the validator doesn't change in all the fields that already use it. But
when the parameter is set to false, as in this case, the entry value
string is not trimmed, so it only validate to false if the field is
actually empty. I also added some unit tests to make sure that this new
condition doesn't break the validator.

https://github.com/user-attachments/assets/049f7424-00c6-4bb2-ab89-2ce158ac4c4e

#### Notes
In the video it can be seen that a banner flashes when saving. It is a
bug that already happened before this one. I've opened [an
issue](elastic#197810) to address it.

(cherry picked from commit 2f7f8e3)
@kibanamachine kibanamachine requested a review from a team as a code owner November 7, 2024 11:14
@kibanamachine kibanamachine enabled auto-merge (squash) November 7, 2024 11:14
@ElenaStoeva
Copy link
Contributor

Closing as this was unintentionally created due to an incorrect backport label on the original PR.

@ElenaStoeva ElenaStoeva closed this Nov 7, 2024
auto-merge was automatically disabled November 7, 2024 11:46

Pull request was closed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ingestPipelines 404.6KB 404.6KB +3.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
esUiShared 106.7KB 106.7KB +22.0B

cc @SoniaSanzV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants