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

[Lens] Prevent identical include and exclude values #197628

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

VriaA
Copy link
Contributor

@VriaA VriaA commented Oct 24, 2024

Summary

Fixes #194639

  • This PR adds filtering logic to:
    • onChangeIncludeExcludeOptions
    • onCreateOption
    • onIncludeRegexChangeToDebounce
    • onExcludeRegexChangeToDebounce

These changes prevent the include and exclude fields from having the same values simultaneously.

Checklist

include_exclude.1.mp4

@VriaA VriaA requested a review from a team as a code owner October 24, 2024 12:34
@VriaA VriaA force-pushed the fix/lens-include-and-exclude-values branch from e8bb295 to fdda52f Compare October 25, 2024 01:32
@mbondyra mbondyra added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure backport:version Backport to applied version labels labels Oct 31, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for great work and the added tests. Approving!

@mbondyra mbondyra enabled auto-merge (squash) November 11, 2024 10:14
@mbondyra mbondyra changed the title [lens] Prevent identical include and exclude values [Lens] Prevent identical include and exclude values Nov 11, 2024
@mbondyra
Copy link
Contributor

buildkite test this

@mbondyra
Copy link
Contributor

run docs-build

@mbondyra mbondyra merged commit 750e578 into elastic:main Nov 11, 2024
23 checks passed
@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
lens 1.5MB 1.5MB +304.0B

History

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 12, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 197628 locally

tkajtoch pushed a commit to tkajtoch/kibana that referenced this pull request Nov 12, 2024
## Summary

Fixes elastic#194639

- This PR adds filtering logic to:
  - `onChangeIncludeExcludeOptions`
  - `onCreateOption`
  - `onIncludeRegexChangeToDebounce` 
  - `onExcludeRegexChangeToDebounce`

These changes prevent the include and exclude fields from having the
same values simultaneously.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios



https://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef

---------

Co-authored-by: Marta Bondyra <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 197628 locally

@nickofthyme
Copy link
Contributor

nickofthyme commented Nov 13, 2024

@mbondyra is there a reason not to backport this to the prev-minor? If not I suggest replacing the backport label withbackport:prev-minor.

@nickofthyme nickofthyme removed the backport:version Backport to applied version labels label Nov 13, 2024
@nickofthyme nickofthyme added the backport:current-major Backport to all previous minor branches label Nov 13, 2024
@mbondyra mbondyra added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Nov 14, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11834708008

@mbondyra
Copy link
Contributor

Sounds good @nickofthyme 👌🏼

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 14, 2024
## Summary

Fixes elastic#194639

- This PR adds filtering logic to:
  - `onChangeIncludeExcludeOptions`
  - `onCreateOption`
  - `onIncludeRegexChangeToDebounce`
  - `onExcludeRegexChangeToDebounce`

These changes prevent the include and exclude fields from having the
same values simultaneously.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

https://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef

---------

Co-authored-by: Marta Bondyra <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 750e578)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 14, 2024
…200133)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[lens] Prevent identical include and exclude values
(#197628)](#197628)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Oyelola
Victoria","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-11T16:48:23Z","message":"[lens]
Prevent identical include and exclude values (#197628)\n\n##
Summary\r\n\r\nFixes #194639\r\n\r\n- This PR adds filtering logic
to:\r\n - `onChangeIncludeExcludeOptions`\r\n - `onCreateOption`\r\n -
`onIncludeRegexChangeToDebounce` \r\n -
`onExcludeRegexChangeToDebounce`\r\n\r\nThese changes prevent the
include and exclude fields from having the\r\nsame values
simultaneously.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef\r\n\r\n---------\r\n\r\nCo-authored-by:
Marta Bondyra
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"750e578f2867d1ad6bf2f1f7506a1d75f2d77d05","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","backport
missing","💝community","v9.0.0","backport:current-major"],"title":"[Lens]
Prevent identical include and exclude
values","number":197628,"url":"https://github.com/elastic/kibana/pull/197628","mergeCommit":{"message":"[lens]
Prevent identical include and exclude values (#197628)\n\n##
Summary\r\n\r\nFixes #194639\r\n\r\n- This PR adds filtering logic
to:\r\n - `onChangeIncludeExcludeOptions`\r\n - `onCreateOption`\r\n -
`onIncludeRegexChangeToDebounce` \r\n -
`onExcludeRegexChangeToDebounce`\r\n\r\nThese changes prevent the
include and exclude fields from having the\r\nsame values
simultaneously.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef\r\n\r\n---------\r\n\r\nCo-authored-by:
Marta Bondyra
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"750e578f2867d1ad6bf2f1f7506a1d75f2d77d05"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197628","number":197628,"mergeCommit":{"message":"[lens]
Prevent identical include and exclude values (#197628)\n\n##
Summary\r\n\r\nFixes #194639\r\n\r\n- This PR adds filtering logic
to:\r\n - `onChangeIncludeExcludeOptions`\r\n - `onCreateOption`\r\n -
`onIncludeRegexChangeToDebounce` \r\n -
`onExcludeRegexChangeToDebounce`\r\n\r\nThese changes prevent the
include and exclude fields from having the\r\nsame values
simultaneously.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef\r\n\r\n---------\r\n\r\nCo-authored-by:
Marta Bondyra
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"750e578f2867d1ad6bf2f1f7506a1d75f2d77d05"}}]}]
BACKPORT-->

Co-authored-by: Oyelola Victoria <[email protected]>
@kibanamachine kibanamachine added v8.17.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Nov 14, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
## Summary

Fixes elastic#194639

- This PR adds filtering logic to:
  - `onChangeIncludeExcludeOptions`
  - `onCreateOption`
  - `onIncludeRegexChangeToDebounce` 
  - `onExcludeRegexChangeToDebounce`

These changes prevent the include and exclude fields from having the
same values simultaneously.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios



https://github.com/user-attachments/assets/8f848c2a-0bea-46c6-b335-b04d62c12aef

---------

Co-authored-by: Marta Bondyra <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:current-major Backport to all previous minor branches 💝community release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Include and exclude values can be the same in advanced config for lens bar chart
6 participants