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

[Security Solution] Timeline : Disabling Timeline ESQL feature flag should disable ESQL Tab. #182816

Merged
merged 4 commits into from
May 8, 2024

Conversation

logeekal
Copy link
Contributor

@logeekal logeekal commented May 7, 2024

Summary

handles #182798

Recently there was PR : #181616 which does not disable ES|QL tab in timeline even if feature flag is disabled when :

  • User has already created a ESQL Query in timeline and saved the timeline.

This PR makes sure when below feature flag exists, then ES|QL tab will be definitely disabled even when user has a saved timeline with ES|QL Query in it.

xpack.securitySolution.enableExperimental:
  - timelineEsqlTabDisabled

Desk Testing Guidelines

  1. Remove above Feature Flag
  2. Go to Timeline and Create a Timeline with ESQL Query
  3. Save the timeline.
  4. Go To advanced Settings and search for esql and disable the enableESQL setting.
  5. Go back to the timeline saved in step 3.
  6. ✅ Assert that the ES|QL tab is still there.
  7. ✅ Assert that the ES|QL tab is NOT there in a new timeline.
  8. Add above feature flag - which disables the esql Tab.
  9. Go back to the timeline saved in step 3.
  10. ✅ Assert that the ES|QL tab is no longer there.
  11. ✅ Assert that the ES|QL tab is NOT there in a new timeline.

Checklist

@logeekal logeekal added Team:Threat Hunting:Investigations Security Solution Investigations Team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.14.0 release_note:fix labels May 7, 2024
@logeekal logeekal changed the title [Security Solution] Timeline : Disbaling Timeline ESQL feature flag should disable ESQL Tab. [Security Solution] Timeline : Disabling Timeline ESQL feature flag should disable ESQL Tab. May 7, 2024
@logeekal logeekal marked this pull request as ready for review May 7, 2024 12:20
@logeekal logeekal requested review from a team as code owners May 7, 2024 12:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@logeekal
Copy link
Contributor Author

logeekal commented May 7, 2024

/ci

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks for making this change Jatin! The changes you made here are accurate 😄

Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

code LGTM and I think I tested all combinations for the advanced settings and feature flag with timeline saved with or without the es|ql tab

@logeekal logeekal enabled auto-merge (squash) May 7, 2024 18:00
@kibana-ci
Copy link
Collaborator

💚 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
securitySolution 15.3MB 15.3MB +815.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@logeekal logeekal merged commit c43da3e into elastic:main May 8, 2024
35 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 8, 2024
…hould disable ESQL Tab. (elastic#182816)

## Summary

handles elastic#182798

Recently there was PR : elastic#181616
which does not disable ES|QL tab in timeline even if feature flag is
disabled when :
- User has already created a ESQL Query in timeline and saved the
timeline.

This PR makes sure when below feature flag exists, then `ES|QL` tab will
be definitely disabled even when user has a saved timeline with ES|QL
Query in it.

```yaml
xpack.securitySolution.enableExperimental:
  - timelineEsqlTabDisabled

```

## Desk Testing Guidelines

1. Remove above Feature Flag
2. Go to Timeline and Create a Timeline with ESQL Query
3. Save the timeline.
4. Go To advanced Settings and search for `esql` and disable the
`enableESQL` setting.
5. Go back to the timeline saved in step 3.
6. ✅ Assert that the `ES|QL` tab is still there.
7. ✅ Assert that the `ES|QL` tab is NOT there in a new timeline.
8. Add above feature flag - which disables the esql Tab.
9. Go back to the timeline saved in step 3.
10. ✅ Assert that the `ES|QL` tab is no longer there.
11. ✅ Assert that the `ES|QL` tab is NOT there in a new timeline.

### 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

(cherry picked from commit c43da3e)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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 May 8, 2024
… flag should disable ESQL Tab. (#182816) (#182905)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Security Solution] Timeline : Disabling Timeline ESQL feature flag
should disable ESQL Tab.
(#182816)](#182816)

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

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

<!--BACKPORT [{"author":{"name":"Jatin
Kathuria","email":"jatin.kathuria@elastic.co"},"sourceCommit":{"committedDate":"2024-05-08T06:21:30Z","message":"[Security
Solution] Timeline : Disabling Timeline ESQL feature flag should disable
ESQL Tab. (#182816)\n\n## Summary\r\n\r\nhandles
https://github.com/elastic/kibana/issues/182798\r\n\r\nRecently there
was PR : https://github.com/elastic/kibana/pull/181616\r\nwhich does not
disable ES|QL tab in timeline even if feature flag is\r\ndisabled when
:\r\n- User has already created a ESQL Query in timeline and saved
the\r\ntimeline.\r\n\r\nThis PR makes sure when below feature flag
exists, then `ES|QL` tab will\r\nbe definitely disabled even when user
has a saved timeline with ES|QL\r\nQuery in
it.\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n -
timelineEsqlTabDisabled\r\n\r\n```\r\n\r\n## Desk Testing
Guidelines\r\n\r\n1. Remove above Feature Flag\r\n2. Go to Timeline and
Create a Timeline with ESQL Query\r\n3. Save the timeline.\r\n4. Go To
advanced Settings and search for `esql` and disable the\r\n`enableESQL`
setting.\r\n5. Go back to the timeline saved in step 3. \r\n6. ✅ Assert
that the `ES|QL` tab is still there.\r\n7. ✅ Assert that the `ES|QL` tab
is NOT there in a new timeline.\r\n8. Add above feature flag - which
disables the esql Tab.\r\n9. Go back to the timeline saved in step
3.\r\n10. ✅ Assert that the `ES|QL` tab is no longer there.\r\n11. ✅
Assert that the `ES|QL` tab is NOT there in a new
timeline.\r\n\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","sha":"c43da3e4349a6bb13cdab507530efd926147c30b","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.14.0","v8.15.0"],"title":"[Security
Solution] Timeline : Disabling Timeline ESQL feature flag should disable
ESQL Tab.
","number":182816,"url":"https://github.com/elastic/kibana/pull/182816","mergeCommit":{"message":"[Security
Solution] Timeline : Disabling Timeline ESQL feature flag should disable
ESQL Tab. (#182816)\n\n## Summary\r\n\r\nhandles
https://github.com/elastic/kibana/issues/182798\r\n\r\nRecently there
was PR : https://github.com/elastic/kibana/pull/181616\r\nwhich does not
disable ES|QL tab in timeline even if feature flag is\r\ndisabled when
:\r\n- User has already created a ESQL Query in timeline and saved
the\r\ntimeline.\r\n\r\nThis PR makes sure when below feature flag
exists, then `ES|QL` tab will\r\nbe definitely disabled even when user
has a saved timeline with ES|QL\r\nQuery in
it.\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n -
timelineEsqlTabDisabled\r\n\r\n```\r\n\r\n## Desk Testing
Guidelines\r\n\r\n1. Remove above Feature Flag\r\n2. Go to Timeline and
Create a Timeline with ESQL Query\r\n3. Save the timeline.\r\n4. Go To
advanced Settings and search for `esql` and disable the\r\n`enableESQL`
setting.\r\n5. Go back to the timeline saved in step 3. \r\n6. ✅ Assert
that the `ES|QL` tab is still there.\r\n7. ✅ Assert that the `ES|QL` tab
is NOT there in a new timeline.\r\n8. Add above feature flag - which
disables the esql Tab.\r\n9. Go back to the timeline saved in step
3.\r\n10. ✅ Assert that the `ES|QL` tab is no longer there.\r\n11. ✅
Assert that the `ES|QL` tab is NOT there in a new
timeline.\r\n\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","sha":"c43da3e4349a6bb13cdab507530efd926147c30b"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182816","number":182816,"mergeCommit":{"message":"[Security
Solution] Timeline : Disabling Timeline ESQL feature flag should disable
ESQL Tab. (#182816)\n\n## Summary\r\n\r\nhandles
https://github.com/elastic/kibana/issues/182798\r\n\r\nRecently there
was PR : https://github.com/elastic/kibana/pull/181616\r\nwhich does not
disable ES|QL tab in timeline even if feature flag is\r\ndisabled when
:\r\n- User has already created a ESQL Query in timeline and saved
the\r\ntimeline.\r\n\r\nThis PR makes sure when below feature flag
exists, then `ES|QL` tab will\r\nbe definitely disabled even when user
has a saved timeline with ES|QL\r\nQuery in
it.\r\n\r\n```yaml\r\nxpack.securitySolution.enableExperimental:\r\n -
timelineEsqlTabDisabled\r\n\r\n```\r\n\r\n## Desk Testing
Guidelines\r\n\r\n1. Remove above Feature Flag\r\n2. Go to Timeline and
Create a Timeline with ESQL Query\r\n3. Save the timeline.\r\n4. Go To
advanced Settings and search for `esql` and disable the\r\n`enableESQL`
setting.\r\n5. Go back to the timeline saved in step 3. \r\n6. ✅ Assert
that the `ES|QL` tab is still there.\r\n7. ✅ Assert that the `ES|QL` tab
is NOT there in a new timeline.\r\n8. Add above feature flag - which
disables the esql Tab.\r\n9. Go back to the timeline saved in step
3.\r\n10. ✅ Assert that the `ES|QL` tab is no longer there.\r\n11. ✅
Assert that the `ES|QL` tab is NOT there in a new
timeline.\r\n\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","sha":"c43da3e4349a6bb13cdab507530efd926147c30b"}}]}]
BACKPORT-->

Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:fix Team:Threat Hunting:Investigations Security Solution Investigations Team v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants