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

[Fleet] Fix bugs w/ synthetic source toggle #143097

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

kpollich
Copy link
Member

@kpollich kpollich commented Oct 11, 2022

Summary

Closes #143094

  • Ensure independent enabled/disabled state across all data streams for synthetic source toggle
  • Always display advanced options section, even on "policy create" and when there are no advanced options present in the package to ensure experimental settings are presented

Backporting to 8.5.x since #140132 landed in 8.5.

Screen recording of independent toggle state

Screen.Recording.2022-10-11.at.10.59.29.AM.mov

@kpollich kpollich added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Oct 11, 2022
@kpollich kpollich self-assigned this Oct 11, 2022
@kpollich kpollich requested a review from a team as a code owner October 11, 2022 15:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

<Fragment>
<EuiFlexItem>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
{/* Advanced section - always shown since we display experimental indexing settings here */}
Copy link
Member Author

Choose a reason for hiding this comment

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

Most of the diff here is whitespace only, so recommend viewing with GitHub's "ignore whitespace" option

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine kibanamachine requested a review from a team as a code owner October 11, 2022 16:23
@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
fleet 918.3KB 918.5KB +176.0B

History

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

cc @kpollich

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

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

Import reformatting in x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx LGTM

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

@kpollich kpollich merged commit 5c3e256 into elastic:main Oct 12, 2022
@kpollich kpollich deleted the 143094-fix-synthetic-source-toggle branch October 12, 2022 11:40
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 12, 2022
* Fix bugs w/ synthetic source toggle

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit 5c3e256)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.5

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 Oct 12, 2022
* Fix bugs w/ synthetic source toggle

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit 5c3e256)

Co-authored-by: Kyle Pollich <[email protected]>
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:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.5.0 v8.6.0
Projects
None yet
6 participants