Skip to content

Conversation

@nchaulet
Copy link
Member

@nchaulet nchaulet commented Jan 4, 2023

Summary

Related to #148317

Introduce a new feature flag to only show the index settings if the user enable it.
in Kibana config

xpack.fleet.enableExperimental: ['experimentalDataStreamSettings']

With the flag on

Screen Shot 2023-01-04 at 3 21 46 PM

With the flag off (by default)

Screen Shot 2023-01-04 at 3 20 28 PM

Todo

  • whitelist the experimental feature in cloud

@nchaulet nchaulet self-assigned this Jan 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

Documentation preview:

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0 labels Jan 5, 2023
@nchaulet nchaulet marked this pull request as ready for review January 5, 2023 11:46
@nchaulet nchaulet requested a review from a team as a code owner January 5, 2023 11:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@kpollich kpollich 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 🚀

@nchaulet
Copy link
Member Author

nchaulet commented Jan 9, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link

💚 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
fleet 900.0KB 900.2KB +145.0B

Page load bundle

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

id before after diff
fleet 120.8KB 120.8KB +34.0B

History

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

cc @nchaulet

@nchaulet nchaulet merged commit a8f4556 into elastic:main Jan 9, 2023
@nchaulet nchaulet deleted the feature-datastream-behind-feature-flag branch January 9, 2023 18:47
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Jan 9, 2023
jennypavlova pushed a commit to jennypavlova/kibana that referenced this pull request Jan 13, 2023
jen-huang added a commit that referenced this pull request Apr 11, 2023
…#154612)

## Summary

_Please review with [whitespace
ignore](https://github.com/elastic/kibana/pull/154612/files?diff=unified&w=1)!_

In #143097 the conditional for showing `Advanced options` was removed as
we introduced experimental indexing toggles which are always shown.
However in #148418 (8.7) we put the indexing toggles behind a feature
flag. This caused the `Advanced options` toggle to always be shown
regardless of there is any content underneath. I spotted this while
testing something unrelated.

This PR fixes that by adding a condition back that is based on
aggregating the conditionals of everything underneath (existence of
advanced vars, whether pipelines & mappings are shown, and if
experimental indexing toggles are enabled).
jen-huang added a commit to jen-huang/kibana that referenced this pull request Apr 11, 2023
…elastic#154612)

## Summary

_Please review with [whitespace
ignore](https://github.com/elastic/kibana/pull/154612/files?diff=unified&w=1)!_

In elastic#143097 the conditional for showing `Advanced options` was removed as
we introduced experimental indexing toggles which are always shown.
However in elastic#148418 (8.7) we put the indexing toggles behind a feature
flag. This caused the `Advanced options` toggle to always be shown
regardless of there is any content underneath. I spotted this while
testing something unrelated.

This PR fixes that by adding a condition back that is based on
aggregating the conditionals of everything underneath (existence of
advanced vars, whether pipelines & mappings are shown, and if
experimental indexing toggles are enabled).

(cherry picked from commit 2636262)

# Conflicts:
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx
jen-huang added a commit that referenced this pull request Apr 11, 2023
…howing (#154612) (#154784)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Fleet] Fix "Advanced options" toggle in policy editor always showing
(#154612)](#154612)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-04-11T18:32:05Z","message":"[Fleet]
Fix \"Advanced options\" toggle in policy editor always showing
(#154612)\n\n## Summary\r\n\r\n_Please review with
[whitespace\r\nignore](https://github.com/elastic/kibana/pull/154612/files?diff=unified&w=1)!_\r\n\r\nIn
#143097 the conditional for showing `Advanced options` was removed
as\r\nwe introduced experimental indexing toggles which are always
shown.\r\nHowever in #148418 (8.7) we put the indexing toggles behind a
feature\r\nflag. This caused the `Advanced options` toggle to always be
shown\r\nregardless of there is any content underneath. I spotted this
while\r\ntesting something unrelated.\r\n\r\nThis PR fixes that by
adding a condition back that is based on\r\naggregating the conditionals
of everything underneath (existence of\r\nadvanced vars, whether
pipelines & mappings are shown, and if\r\nexperimental indexing toggles
are
enabled).","sha":"2636262e093f188e4937d192d302607eeaafff85","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.8.0"],"number":154612,"url":"https://github.com/elastic/kibana/pull/154612","mergeCommit":{"message":"[Fleet]
Fix \"Advanced options\" toggle in policy editor always showing
(#154612)\n\n## Summary\r\n\r\n_Please review with
[whitespace\r\nignore](https://github.com/elastic/kibana/pull/154612/files?diff=unified&w=1)!_\r\n\r\nIn
#143097 the conditional for showing `Advanced options` was removed
as\r\nwe introduced experimental indexing toggles which are always
shown.\r\nHowever in #148418 (8.7) we put the indexing toggles behind a
feature\r\nflag. This caused the `Advanced options` toggle to always be
shown\r\nregardless of there is any content underneath. I spotted this
while\r\ntesting something unrelated.\r\n\r\nThis PR fixes that by
adding a condition back that is based on\r\naggregating the conditionals
of everything underneath (existence of\r\nadvanced vars, whether
pipelines & mappings are shown, and if\r\nexperimental indexing toggles
are
enabled).","sha":"2636262e093f188e4937d192d302607eeaafff85"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/154612","number":154612,"mergeCommit":{"message":"[Fleet]
Fix \"Advanced options\" toggle in policy editor always showing
(#154612)\n\n## Summary\r\n\r\n_Please review with
[whitespace\r\nignore](https://github.com/elastic/kibana/pull/154612/files?diff=unified&w=1)!_\r\n\r\nIn
#143097 the conditional for showing `Advanced options` was removed
as\r\nwe introduced experimental indexing toggles which are always
shown.\r\nHowever in #148418 (8.7) we put the indexing toggles behind a
feature\r\nflag. This caused the `Advanced options` toggle to always be
shown\r\nregardless of there is any content underneath. I spotted this
while\r\ntesting something unrelated.\r\n\r\nThis PR fixes that by
adding a condition back that is based on\r\naggregating the conditionals
of everything underneath (existence of\r\nadvanced vars, whether
pipelines & mappings are shown, and if\r\nexperimental indexing toggles
are enabled).","sha":"2636262e093f188e4937d192d302607eeaafff85"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants